首页 > 其他 > 详细

拖拉控件TableView的使用

时间:2015-12-11 09:53:44      阅读:139      评论:0      收藏:0      [点我收藏+]

 

拖拉控件TableView关系如下:

技术分享

并且要在cellForRow方法里面添加如下代码:

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    FirstTableViewCell *cell = (FirstTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"FirstCellReuse"];
    if (cell == nil) {
        NSArray * nib = [[NSBundle mainBundle]loadNibNamed:@"FirstTableViewCell" owner:self options:nil];
        cell = [nib objectAtIndex:0];
    }
    cell.nameLabel.text = self.array[indexPath.row];
    return cell;
}
再实现它的delegate和datasource就可以了

拖拉控件TableView的使用

原文:http://www.cnblogs.com/songtingting/p/5038026.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!