UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath: Exception

后端 未结 9 2163
悲&欢浪女
悲&欢浪女 2021-01-03 19:15

i actually dont see my error:

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


        
9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 19:52

    You're returning friendCell, and it's very likely nil.

    Your code looks fine, so make sure you have your Interface Builder file set up right. In FriendTableViewCell.xib, be sure the File's Owner is your table view controller and that you correctly set the cell to be an outlet to friendCell (which I assume is a UITableViewCell).

提交回复
热议问题