开发者

iPhone keyboard ignores second request for Numeric and Punctuation

I have a method that creates a local textfield and pops up the keyboard ( of a given type ) to fill the field. I call this 4 times each following the开发者_StackOverflow社区 input done event of the previous.

The first time i call it with the default keyboard and the following three are with the UIKeyBoardTypeNumbersAndPunctuation keyboard. The weird thing is that the third call ( second of UIKeyBoardTypeNumbersAndPunctuation ) brings up the Default keyboard and the fourth brings up UIKeyBoardTypeNumbersAndPunctuation again.

Any ideas as to why this might be happening?


Seems like Crufy's answer to this question also solves this problem: becomeFirstResponder Doesn't respect Keyboard settings

Returning NO from

- (BOOL)textFieldShouldReturn:(UITextField*)textField  

in the delegate fixes it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜