【发布时间】:2010-12-02 10:17:36
【问题描述】:
看下面的代码;
@interface testViewController : UIViewController
{
int age;
UIPopoverController *popoverController;
}
@property (nonatomic , retain ) int age;
@property (nonatomic , retain ) UIPopoverController *popoverController;
@end
@property (nonatomic , retain ) int age 为int age; 定义getter 和setter
和@synthesizing 它们在实现中给出了getter 和setter 的自动生成实现。
我不明白的是关于第二个。第二个属性 (@property (nonatomic , retain ) UIPopoverController *popoverController;) 生成什么方法? (:
我见过很多程序使用@property 处理除 int、string 等之外的对象;
任何人都可以指导我获得有关此的适当教程。
提前致谢。 (也有人可以告诉我如何在 stackoverflow 上接受答案)。
【问题讨论】: