をUIView
含む がありUITextView
ます。はUIView
内で開始されますUIViewController
。
しかし、UITextView
箱に触れても何も起こりません。キーボードは表示されず、デリゲート メソッドもインタラクションに応答しません。
コード:
noteText = [[UITextView alloc]initWithFrame:CGRectMake(0, 0, 700, 240)];
noteText.layer.borderColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.2].CGColor;
noteText.layer.borderWidth = 2;
[noteText setEditable:YES];
noteText.userInteractionEnabled = YES;
noteText.returnKeyType = UIReturnKeyDone;
noteText.font = [UIFont fontWithName:@"Calibri" size:16];
noteText.textColor = [UIColor blackColor];
[self addSubview:noteText];
更新 1
UIViewController から他のすべてのビューを削除し、UIViewController に UITextView を配置するだけで、まだ反応しません。カーソルもキーボードも表示されません。