简体   繁体   中英

First responder/focus after dismissing popover

I have a few UITextField inputs on a form screen where some of them have a numpad display that is shown via a custom popover. As the user advances through the fields, we close or open the popover as appropriate. In iOS 11, it seems the "first responder" or field focus is returned to the previous input. As a result, we end up trying to dismiss the main view accidentally.

Is this a known change in iOS 11 or is it a bug? Is there a way to prevent the first responder from going back, and instead advancing forward or not changing at all - some type of tab index, maybe?

This other SO question presents the same issue, but has not been resolved yet either. I can't comment on that issue to increase its visibility, hence this new question.

关闭textFieldShouldEndEditing (并返回 true)而不是textFieldDidEndEditing的弹出框对我textFieldDidEndEditing

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM