A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
   
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cmcc"];
   
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cmcc"];
        
    }
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 100;
}

1 个回复

正序浏览
ff774411 来自手机 中级黑马 2016-1-9 13:27:32
沙发
这是uitableview的两个代理方法,是必须要实现的。
第一个是cell,也是行内容,主要涉及到了cell的重用。
第二个是一共有多少行
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马