为什么TableView 的代理方法cellForRowAtIndexPath 不执行问题

来源:互联网 发布:网络继续教育老师评语 编辑:程序博客网 时间:2024/06/09 04:33

检查一下

  • 这个方法如果返回值为 0 或 nil 就不会执行 cellForRowAtIndexPath 方法
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{    return 0;     或    return nil;}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{    UITableViewCell *cell ····    return cell;}
0 0
原创粉丝点击