UITextView可在iOS5上编辑,但不能在iOS6上编辑
我的应用程序中有几个UITextViews。 由于我已经从XCode 4.5开始构build,所以UITextView在iOS6中是不可编辑的,但是它构build在iOS5设备上,它们是完全可编辑的。
代码还没有改变,我开始使用iOS6。 自从iOS4以来,XIB就已经出现了
症状是…
iOS6的
- 可以提高键盘轻敲和删除字符,但不能input任何其他内容
- 用键盘隐藏键可以降低键盘。
iOS5的
- 可以通过点击提高键盘并完全编辑。
- 用键盘隐藏键可以降低键盘。
我很困惑。 textViewDidBeginEditing:
被击中,所以我知道它的连线正确。
testing项目的方法没有工作,因为我不能重现这个问题。
最后修复是这个不存在的。
[window makeKeyAndVisible];
如…
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.viewController = [[[MyViewController alloc] initWithNibName:nil bundle:nil] autorelease]; self.navigationController = [[[UINavigationController alloc] initWithRootViewController:self.viewController] autorelease]; [window setRootViewController:navigationController]; [window makeKeyAndVisible]; }
在我的情况下,这是因为UIAltertView
被调用两次。
你可能不认为你从来没有input过任何密钥,但BackSpace键确实符合要求。
然后我删除了第二个UIAlertView
和TextField
工作。
我认为你需要检查UIAlertView
代码。