ios - How to declare object variables for good code structure objective C -
i know question silly need know further development. developing iphone application programmatically without using xib , storyboard, have declared multiple object variables below
uinavigationcontroller *navigationcontroller; uiactivityindicatorview *activityindicator; uiimageview *splashimage; nstimer *checkjsontimer; uilocalnotification *localnotification; nsuserdefaults * defaults; @property (strong, nonatomic) uiwindow *window; @property (strong, nonatomic) login *loginview; @end above code .h file had declared, question of uiobjects declared without @property , variable declaring properties , attributes also. objects ui , ns , how declare above 2 methods.
which 1 proper way of programming , too?.
you should read documentation.. short answer properties give getters , setters free. (but please read docs, there lot more , possible) when define @property don't have define variable anymore (in past had actually). want want use properties.
Comments
Post a Comment