Xcode 6 FirstResponder Picker Conundrum

So I’m working away on a simple app, that has data presented in tableViews. By default tableViews use UILabels to display the data. To make them editable, requires adding a custom tableViewCell class and putting UITextFields in place. Simple enough.

What if the data to be input is a date or a choice of one, two or three values? Well then you add a UIDatePickerView or a UIPickerView when the user taps on the field. But wait! This is Xcode 6’s Simulator you’re running on. Why not mess with the developer a bit – that should be fun. When the date textField is tapped do nothing. Let’s see how many Google searches or twitter posts are required to solve this?

iOS Simulator Screen Shot Oct 14, 2014, 7.34.49 PM


Wait! What!? Tapping the date field doesn’t open the Date Picker?

“Well, let’s take a look at the simulator’s Keyboard setting,” says the wizen senior developer. Sure enough under the Hardware menu, is a Keyboard, with a submenu checked that says, “Connect Hardware Keyboard.” Uncheck that, and as if by magic, the Date Picker appears. There is much rejoicing throughout the land.

Picker View appears when "Connect Hardware Keyboard" is unchecked
Picker View appears when “Connect Hardware Keyboard” is unchecked

The example app is form “More iOS 6 Development” published by Apress.