RSS Feed

Getting Rid of that Pesky Keyboard

Posted on

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:

with this:

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!

Advertisements

One response »

  1. Great work, Jeannette. And thanks for the blog for Appcamp!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: