技术文章分类(180)

技术随笔(11)

UITableviewCell系统定义的几种方式

 

1,UITableViewCellStyleDefault

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    static NSString *identifier = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    cell.imageView.image = [UIImage imageNamed:@"userIcon.png"];
    cell.textLabel.text = @"王宝强";
    
    return cell;
}

 

posted @ 2014-08-11 15:22  坤哥MartinLi  阅读(276)  评论(0编辑  收藏  举报