How to convert this code from Swift to Objective C -


private var distance: double {     return fabs(max - min) } 

how define variable in objective c language.

in .m file:

@interface myclass () @property (nonatomic, assign, readonly) double distance; @end  @implementation myclass  -(double)distance {     return fabs(max - min); }  @end 

Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -