UItableView和UIScrollView的复用问题

在一个宽度为三维屏宽的ScrollView中加入三个UIViewController,在UIControllerView中添加tableView,通过分层图发现tableVIew已经出来了,但是cell出不来,怎么解决冲突,代码如下:

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


    StoryCellViewModel *model = [ self .contactsobjectAtIndex:indexPath.row];

    

    // 构建cell

    FamousViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([FamousViewCellclass])];

    if (!cell) {

        cell = [[FamousCollectionViewCellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:NSStringFromClass([FamousViewCellclass])];

    }

    cell.model = model;

    

    return cell;

}


这个函数通过打断点,发现根本没有被执行到

#iOS工程师#
全部评论
tableView中每个cell的高度设置了吗?还有cell中section的数量等等
点赞 回复 分享
发布于 2016-09-28 14:57

相关推荐

12-15 11:27
门头沟学院 Java
哇哇的菜鸡oc:所有人不要理会,就好了,后面他就知道怎么回事了,只能说有的时候市场都是被宰的人搞坏的
点赞 评论 收藏
分享
冲鸭2024:亚信不去也罢
投递亚信科技(中国)有限公司等公司6个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务