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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -