Look a the below code;
@interface testViewController : UIViewController
{
int age;
UIPopoverController *popoverController;
}
@property (nonatomic , ret
It is difficult to advise anything better then official documentation (at least you should start with reading it).
@property (nonatomic , retain ) int age;
Is really supposed to declare setter/getter methods for age ivar, but that line will give compiler error as you can't declare property with retain attribute for non-object types (see docs for more details)
@property (nonatomic , retain ) UIPopoverController *popoverController;
This line does not differ much from the 1st one - it also declares setter and getter methods for popoverController ivar, and automatically synthesized setter will retain popoverController it gets
@synthesize
always creates the accessors. In your case:
- (void) setPopoverController:(UIPopoverController *)value;
- (UIPopoverController *) popoverController;
If you have this:
@property (nonatomic , retain ) UIPopoverController *popoverController;
the methods generated by @synthesize will be something like:
-(UIPopoverController*) popoverController
{
return popoverController;
}
-(void) setPopoverController: (UIPopoverController*) newValue
{
[newValue retain];
[popoverController release];
popoverController = newValue;
}