我正在尝试使用 Autolayout 和 Interface Builder 来创建自定义 TableViewCell。我在 viewDidLoad 中设置了我的单元格,如下所示:
[tableView registerNib:[UINib nibWithNibName:@"BChatCell" bundle:Nil] forCellReuseIdentifier:@"ChatCell"];
然后我像这样使单元格出列:
- (UITableViewCell *)tableView:(UITableView *)tableView_ cellForRowAtIndexPath: (NSIndexPath *)indexPath {
BChatCell * cell = [tableView_ dequeueReusableCellWithIdentifier:@"ChatCell"];
return cell;
}
当表格视图第一次加载时,它会正确加载:
但是,表格滚动后,自动布局中断:
以下是约束:
任何帮助将不胜感激。