ios 8:在UITextview中点击时,键盘没有弹出但在ios 7中运行良好

Sri*_*n N 1 uitextview ios ios8

它仍然在ios 7中运行良好,UITextView被添加到popover并显示.

UITextView *textViewComment =[[UITextView alloc]init];
textViewComment.tag = 2001;
textViewComment.delegate = self;
textViewComment.frame=CGRectMake(15,60, 370,120);
textViewComment.contentInset = UIEdgeInsetsMake(5.0f, 5.0f, 5.0f, 0.0f);
[textViewComment setReturnKeyType:UIReturnKeyDone];
textViewComment.textAlignment = NSTextAlignmentLeft;
textViewComment.showsHorizontalScrollIndicator = NO;
textViewComment.bounces = NO;
textViewComment.layer.borderColor = [[UIColor lightGrayColor]CGColor];
textViewComment.layer.borderWidth =1.0f;
[textViewComment addSubview:commentPlaceHolderLabel];
[popupViewController.view addSubview:textViewComment];
Run Code Online (Sandbox Code Playgroud)

在ios8上添加textViewComment.keyBoardType = UIKeyboardAlphabet,textViewComment.enable = YES; 没有帮助.我不知道自己犯了什么错误.这是新的sdk bug吗?还是我的虫子?

提前致谢

str*_*eem 5

你在模拟器工作吗?

因为默认情况下会选择硬件键盘并且不会显示模拟器.

您可以通过进入菜单"硬件" - >"键盘"更改它并取消选择"连接硬件键盘"