【发布时间】:2011-05-03 09:32:20
【问题描述】:
也许这是一个愚蠢的问题。每次我制作 @property 时,我都必须 @synthesize 它。但这没有任何意义,你可以用@property(whatever) Type* property 做的唯一事情就是在实现文件中做@synthesize property。那么为什么两者都需要呢?为什么编译器不自动生成 getter/setter 方法而无需我编写 @synthesize property。
【问题讨论】: