All about developing products for Apple stuff - includes iOS and Mac development, Swift, Objective-C, Xcode and related topics.
To use both the software and Mac keyboard in the iOS Simulator:
Hardware > Keyboard > Connect Hardware Keyboardis checked
Toggle between showing and hiding the iOS keyboard by pressing
command-k(this is the keyboard shortcut for
Hardware > Keyboard > Toggle Software Keyboard). When the iOS keyboard is visible, you may continue to type using your Mac’s keyboard, or by clicking the keys on the iOS keyboard.
Dismissing iOS Keyboard - explains how to have the keyboard hide itself by tapping anywhere outside of an input text field.
If you want there is only a single text field and you want to dismiss the keyboard after, say, a button is clicked, then enter the following in the button pressed function, towards the end of the function:
Xcode Key Bindings & Gestures : NSHipster - The best resource, I think, for Xcode shortcuts.
Two resources for understanding Objective-C blocks syntax: