问题
In iOS7, I set the keyboard for my UITextField in Interface builder to the dark style, however, whenever I click on the textField the keyboard initially shows as light for a fraction of a second before turning to the dark style, how can I have it not do this?
回答1:
I had the same issue. It seems as though it only happens the first time the keyboard appears after an app has been suspended, and then resumed.
I was never able to directly resolve the issue, but in my case, I was able to find a workaround. Specifically, my issue was with a passcode screen, which needed to appear after resume. Every time the keyboard was shown on the passcode screen, it would start as light colored and then flash to dark halfway through the animation.
I got around this by making my keyboard become the first responder when the suspend event was received, instead of resume.
May not help you, but thought I would share my workaround.
回答2:
This is a bug in iOS 7. I have been dealing with the same issue. It has been fixed in iOS 7. I tested in iOS 7 beta 3 today.
回答3:
Another bug in iOS 7 in seems, a restart of the device fixes it temporarily. Funnily, this issue does not occur in other apps that use the dark keyboard! Who knows!
回答4:
I found that setting autocorrectionType
property to UITextAutocorrectionTypeNo
resolves this issue!
self.myTextField.autocorrectionType = UITextAutocorrectionTypeNo;
来源:https://stackoverflow.com/questions/19258765/ios-7-keyboard-color-flash