Being new to iPhone goodness, I wasn’t entirely sure how my app should work. For instance:
I would assume that once I clicked the “Greet Me!” button, the keyboard should disappear. Wrong! Nick challenged us to find the answer on our own. I located this cocoapi entry that gave pretty straightforward instructions for a fair-to-middlin’ iOSer for doing exactly that. However, since I am a complete n00b, I needed some help.
The function that sends the text field contents to the label field is called, appropriately, “doSomething.” Initially we wrote it to send the string that was entered via the keyboard to the label field. All I think I did was append this function:
I attempted some other things but it made my app crash. That was bad.
Now I’m interested in dismissing the keyboard when pressing “return” on the iOS keyboard. Back to my iterative searching and learning experience!