you should know what is the use of @property.
@property offers a way to define the information that a class is intended to encapsulate. If you declare an object/variable using @property , then that object/variable will be accessible to other classes importing its class. If you declare an object using @property in the header file, then you have to synthesize it using @synthesize in the implementation file. Example: .h class @interface ExampleClass : NSObject @property (nonatomic, retain) NSString *name; @end .m class @implementation ExampleClass @synthesize name; @end Now the compiler will synthesize accessor methods for name . ExampleClass *newObject=[[ExampleClass alloc]init]; NSString *name1=[newObject name]; // get 'name' [obj setName:@“Tiger”]; List of attributes of @property : atomic. nonatomic. retain. copy. readonly. readwrite. assign. strong. atomic : It is the default behaviour. If an object is declared as atomic then it becomes ...