ViewController は、静的 (カスタマイズされた) セルを含む TableView で構成されます。行の 1 つは、2 行のテキストを (プレビューとして) 表示する UITextView で構成されます。ユーザーがそれをクリックすると、全画面を埋める UITextView が開きます。
else if (indexPath.row == 3) {
static NSString *countryRegionCellID = @"NotesCell";
NotesCell *cell = (NotesCell *)[tableView dequeueReusableCellWithIdentifier:countryRegionCellID];
if (!cell) {
NSArray* topLevelObjects = [[NSBundle mainBundle] loadNibNamed:countryRegionCellID owner:self options:nil];
for (id currentObject in topLevelObjects) {
if ([currentObject isKindOfClass:[NotesCell class]]) {
cell = (NotesCell *)currentObject;
break;
}
}
}
[self drawBorder:cell];
[self drawPersonalNotes:cell];
return cell;
}
UITextView デリゲート呼び出し:
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
{
NSLog(@"textViewShouldBeginEditing");
[textView becomeFirstResponder];
CGRect r = [[UIScreen mainScreen] bounds];
[textView setFrame:r];
return YES;
}
- (void)textViewDidBeginEditing:(UITextView *)textView
{
NSLog(@"textViewDidBeginEditing");
}
静的セルの高さは 44 に定義されているため、UITextView はフルスクリーンではなくセルのみを埋めます。テーブル ビューの上に新しいビュー コントローラーを配置しますか? ありがとう。