

See, I told you this would be a short one.

I’ve not worked with writing any custom keyboards yet, so I have only conjecture to guide me in how this selection works with them. It might ask them for a version that best approximates these selections, or it might ignore them. I’m not sure how these interact with 3rd party keyboards though. We aren’t going to change any of them today, but if you are curious, you can change the type of keyboard that shows up for you with the “Keyboard Type” combo-box. The Attributes Inspector has a lot of options that you can change for your UITextField if you wish. You can read the earlier post Hello World! Your first iOS App in Swift for some help on project setup and Auto Layout if you want a bit more information. Otherwise, place it somewhere in the top area of the screen, and set up Auto Layout as appropriate. If you don’t want to mess with Auto Layout today, just put it in the top left. Once complete, drag on a UITextField somewhere. Start a new project, and name it “TextFieldTutorial”. Okay, THIS post should probably have the shortest storyboard setup section so far. If you just plop on a UITextField, and try tapping somewhere else…. However, a common issue for many iOS programming beginners is that the last part of that story isn’t built in. Then, usually, when the user clicks outside of the UITextField, the keyboard is dismissed, and the cursor is no longer in that UITextField. When the user taps on it, the keyboard comes up from the bottom of the screen, and allows the user to start typing. It is exactly what it sounds like, just a field on the screen where the user types something in. If you need to take text input in your Swift app, you will probably need a UITextField.
