/** 数据源数组*/
@property (nonatomic, strong)NSMutableArray *dataArray;
#pragma mark - UITableView代理
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//第一次初始化数组里面的元素时,如果是懒加载,不能使用_dataArray,必须使用self.dataArray,其他时候两个都可以使用
return _dataArray.count;
}
Ω
ΩΩ
Ω
我的
#pragma mark - UITableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
//可以 _dataArray, 第一次使用数据时, 不可以。 因为 要初始化。
return _dataArray.count;
}