开发者

iPhone - temporarily disable keyboard

开发者 https://www.devze.com 2023-01-30 01:50 出处:网络
G\'day All My app has a first run component that presents a login/signup screen & on successful login/signup moves on to loading the app\'s data. For those who\'ve seen it the process follows sim

G'day All

My app has a first run component that presents a login/signup screen & on successful login/signup moves on to loading the app's data. For those who've seen it the process follows similar style to that in Instagram. If the keyboard is dismissed on entering the password & there's an error it pops back up as soon as it's gone which strikes me as not being a great look. So is there any way to disable the keyboard or prevent开发者_JAVA技巧 user interaction without actually dismissing it while the app sends the user credentials & waits for a response?

Cheers & TIA, Pedro :)


After the first dismiss, I would set the UITextField as disabled. No user Interaction is possible anymore and the keyboard shouldn't pop up anymore. This will also have the nice UI touch of being greyed out.

Additionally, you should have a TextFieldDelegate 1 implement textFieldShouldBeginEditing: and return NO;. That will cause the keyboard to not appear.

0

精彩评论

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