美文网首页
indexPath.row == 0

indexPath.row == 0

作者: tesla1984 | 来源:发表于2016-11-16 14:45 被阅读0次

tableView数据出来了,但是都是一样的,调试之后发现indexPath.row一直都是0,后来发现这两个方法写反了

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return [self.data count];
}

相关文章

网友评论

      本文标题:indexPath.row == 0

      本文链接:https://www.haomeiwen.com/subject/aaflpttx.html