我正在查看下面的这段代码,试图找出我们两个人中的哪一个...(我或编写它的人)不知道他们在做什么。
为什么他/她先声明属性,然后又声明匹配的变量? 我不能问这个人,因为这个项目是从一个早已消失的小组中继承下来的。
@interface LayerList : UIViewController <UITableViewDataSource, UITableViewDelegate>
{
UITableView *tvList;
ArcGisViewController *mapController;
NSArray *fileList;
}
@property (nonatomic, strong) IBOutlet UITableView *tvList;
@property (nonatomic, strong) ArcGisViewController *mapController;
@property (nonatomic, strong) NSArray *fileList;
-(void)visibleSwitchValueChanged:(id)sender;
-(IBAction) Cancel;
@end
答案 0 :(得分:1)
这是一天中通常的方式,在引入自动合成之前,您必须手动synthesize
设置属性。