简体   繁体   中英

How do I get around my UITextField's HUGE auto-correct dismissal area?

In my UITableView, each row has a text field or switch as its accessory view (a bit like the Settings app). The textFields are set with Auto-capitalisation ON. But the auto-correct prompt (the one you tap to dismiss the suggestion) seems to react to finger presses up to 65 px below the actual textField!

This means, for example, if a user types something in a textField, and then tries to press a UISwitch in the row below (without pressing return), instead of pressing the switch, their first press dismisses the autocorrect. For the user this is both confusing (they have to tap the switch twice) and annoying (they dismiss the text field's correction without meaning to).

Is there any way around this without having gigantic table rows or disabling autocomplete?

Maybe you could have a timer of 1 or 2 seconds that check and resign the textfield automatically.

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