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;
}
テーブル ビューが最初に読み込まれると、正しく読み込まれます。
ただし、テーブルがスクロールした後、自動レイアウトが壊れます。
制約は次のとおりです。
どんな助けでも大歓迎です。