0

レガシープロジェクトで自動レイアウトをアクティブにするのに十分な画面を最終的にきれいにすることができました。ウーフー!

UITableViewとして xib (xib のみ - h/m ファイルはありません) を持つ がありますtableFooterView。いくつかの制約を追加しました (これから説明する問題は、制約の前後で発生しました。制約は何も変更しませんでした)。xib エディターからのスニペット: ここに画像の説明を入力

コードは次のとおりです。

self.tableView.tableFooterView = [[[NSBundle mainBundle] loadNibNamed:@"addCommentView" owner:self options:nil] objectAtIndex:0];
commentTextField = (UITextField *)[self.tableView.tableFooterView viewWithTag:1];
commentTextField.delegate = self;

UIButton *sendButton = (UIButton *)[self.tableView.tableFooterView viewWithTag:2];
[sendButton addTarget:self action:@selector(doSendComment:) forControlEvents:UIControlEventTouchUpInside];

私が見ているのはこれです-ビューの灰色の背景はなく、textFieldは編集できません。 ここに画像の説明を入力
ストーリーボード自体を自動レイアウトする前に機能しました...

問題を探す場所についていくつかのアイデアをいただければ幸いです...

4

0 に答える 0