I have a tab-based app where each tab takes you to a navigation stack of UITableViews. Inexplicably, switching tabs occasionally causes the keyboard to appear.
This is especially weird since it always happens when switching to the first tab, where the UITableView has no UITextViews or UITextFields, or anything that would need the keyboard; it's just a table of vanilla subtitle cells.
It's also especially annoying because the user can't dismiss the keyboard or switch tabs! She can't switch tabs because they're covered, and there are no TextViews/TextFields to put the cursor in and then dismiss the keyboard. So the app is effectively disabled and has to be restarted.
I'd share some code except the key components here are all created in Storyboard.
Anybody heard of anything like this before? Any idea what could be causing it?
Figured it out: if the keyboard is displaying and the view is programmatically popped off the navigation stack without dismissing the keyboard, when you switch to another tab and then back, the keyboard reappears over the view that was revealed by the pop.
I can't see any reason this should happen, so it may be a bug. Apparently, at some level the keyboard is "there" all along, it's just not visible until you switch away and back.
At any rate, this can be avoided by dismissing the keyboard before popping off the nav stack.