What are @property, @synthesize, @implementation, @interface in iphone programming?

2 Solutions Collect From Internet About “What are @property, @synthesize, @implementation, @interface in iphone programming?”

@property generates prototypes for getter and setter methods. You usually place it in an @interface block which is itself in a .h file. The @interface block is where you declare a object’s methods and attributes.

@synthesize generates getter and setter methods. You usually place it in an @implementation block which is itself in a .m file. The @implementation block is where you write the code of the object’s methods.

@property is an objective C directive that allows to generate accessors.here we can specify the name and type of the property

@synthesize directive automatically generates setters and getters for us

• interface : the interface of class is usually stored in .h file and defines instance variables and public methods

• implementation : The implementation of a class is in .m file and usually contains the actual code of the methods