1

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 はフルスクリーンではなくセルのみを埋めます。テーブル ビューの上に新しいビュー コントローラーを配置しますか? ありがとう。

4

1 に答える 1

1

シンプルなテキストビューだけを含む新しい VC にセグエしてください。

終了したら、プロパティを使用してアクセスして、tableView から任意のプロパティにそのテキストを割り当てpresentingViewControllerます。行ってもいい。

于 2013-02-17T00:20:33.460 に答える