无法在iOS6中将文本键入UITextField或UITextView [英] Can't type text into UITextField or UITextView in iOS6
问题描述
在我的某个应用中,当我尝试编辑(输入一些文字) UITextField
, UITextView
或任何其他'text-able' UIControl
光标只是闪烁,但没有输入任何字符,但BACKSPACE除外(只有在我有一些初始文本时才有可能) ),RETURN和切换字符类型。这适用于整个应用程序的所有控件。
In one of my apps, when I try to edit (type some text) UITextField
, UITextView
or any other 'text-able' UIControl
the cursor just blinks but no characters are typed in except BACKSPACE (possible only when I have some initial text in it), RETURN and switching character types. This goes to all controls across whole application.
摘要:
- 它发生了仅来自iOS 6.0(不会发生在iOS 5.x上,4.x上不会出现模拟器或真实设备)
- 所有委托方法都被触发(shouldBeginEditing:didBeginEditing :) 除了 shouldChangeCharactersInRange:
- isFirstResponder标志的行为设置正确(shouldBeginEditing:记录NO,而didBeginEditing:正确记录YES)。它也使用了第一个响应者已经编辑过的日志进行测试。
- 它在任何
UIAlertView $ c $之后自行修复c>呈现给用户并被解雇。如果此警报显示在同一屏幕(UIViewController视图)或任何其他屏幕上,则无关紧要。
- It happens only from iOS 6.0 (does not occur on iOS 5.x, 4.x neither Simulator or real device)
- All delegate methods are fired (shouldBeginEditing: didBeginEditing:) except shouldChangeCharactersInRange:
- isFirstResponder flag is behaving set correctly (shouldBeginEditing: logs NO, while didBeginEditing: logs YES correctly). It is also tested using logs that THE firstResponder IS the one already edited.
- It repairs itself after any
UIAlertView
is presented to the user and dismissed. It doesn't matter if this alert is shown on the same screen (UIViewController view) or any other.
我不知道如何处理或调试它。
I have no idea how to even approach or debug this.
我应该在哪里寻找提示?任何追踪响应者链相关问题的专家等?
Where should I look for hints? Any experts of tracking responder chain related issues etc.?
如何追踪 UIAlertView
的影响问题?
推荐答案
根据你的实现,它是 makeKeyAndVisible
方法您忘记在 - (BOOL)应用程序中调用的
应用程序委托的方法或相应的 UIWindow
类:(UIApplication *)应用程序didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 在主界面xib文件中的启动时可见
。
Depending on your implementation it's either the makeKeyAndVisible
method of the UIWindow
class that you forgot to call inside the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
method of the application delegate or corresponding Visible at Launch
flag in your main interface xib file.
干杯...... :)
Cheers... :)
这篇关于无法在iOS6中将文本键入UITextField或UITextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!