Scrolling to hidden table view cells

I’m currently using BSKeyboardControls to add that fancy Next/Previous/Done buttons to the top of the keyboard on the iPad. I have noticed, however, that while scrolling through the fields in a UITableView, the cursor would sometimes disappear and the keyboard would be detached (typing does nothing).

I threw some logging together and make a discovery – scrolling to a UITableViewCell far off the screen that is UIView.hidden == YES doesn’t allow subviews to receive the becomeFirstResponder message.

And the logs:

The solution (the only one I could come up with) is to fire off a message to the text field after a short delay to become the first responder. This seems to solve the problem.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s