- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//1.创建cell
static NSString *ID = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
if (cell == nil) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
}
//2.设置cell的数据
cell.textLabel.text = @"哈哈";
return cell;
}创建一个可重用的UITableViewCell代码
最新推荐文章于 2018-06-12 14:05:00 发布
本文将介绍如何使用Objective-C语言进行iOS应用开发,包括语言基础、开发环境配置、常见框架使用及实战案例分析。
172

被折叠的 条评论
为什么被折叠?



