ios - Difference between @property and variable within interface declaration -


this question has answer here:

what's difference between putting variable inside of @interface{} declaration in header file, , putting in @property after declaration?

e.g.,

@interface gamecentermanager : nsobject { gkinvite* pendinginvite; } @end 

as opposed to

@interface gamecentermanager : nsobject @property (weak, nonatomic) gkinvite* pendinginvite @end 

declaring property generates getters , setters instance variable, according criteria within parenthesis.

defining variables in brackets declares them instance variables.

following links provides more info on these.

http://www.cocoawithlove.com/2010/03/dynamic-ivars-solving-fragile-base.html

is there difference between "instance variable" , "property" in objective-c?

http://iphonedevelopment.blogspot.in/2008/12/outlets-property-vs-instance-variable.html


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -