ヘッダービューにテキストフィールドを追加しようとしています。テキストフィールドが表示されない理由がわかりませんでした。ラベルを使用すると、完全に機能します。
コードは次のとおりです。
-(UIView*) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(40, 0, self.view.frame.size.width - 70, 30)];
UITextField *sectionTitleTF1 = [[UITextField alloc] initWithFrame:CGRectMake(58, 0, 500, 30)];
sectionTitleTF1.backgroundColor = [UIColor whiteColor];
[sectionTitleTF1 becomeFirstResponder];
[tableHeaderView addSubview:sectionTitleTF1];
return tableHeaderView;
}
ありがとう