Methods for obtaining user input on iPhone

I'm working on an iPhone app and would like to have a simple text input box pop up when a user clicks my custom search button. My problem is that I'm not sure what approaches are available for achieving this. Googling results in search overload and I am presented with so many views that I'm not sure what is standard and what isn't. The information I am requesting from the user is a single zip code so I would like to avoid creating a whole new view for this if possible. I am still new to working in Xcode so please take it easy on me.

Edit: The dialog box that iTunes uses to ask for your password would be ideal. What is that called?


Well, you could use a UIAlertView including a UITextView.

Honestly, I'm not sure Apple will like it, because UIAlertView should only prompt message to inform the user, but it's at least kinda cool ;)

You can find a tutorial on this website :


[alert setAlertViewStyle:UIAlertViewStylePlainTextInput];


[alert setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];

Hope it helps! Best of luck

Need Your Help

Extract specific word from a string

php string preg-match

It might seem easy to do but I have trouble extracting this string. I have a string that has @ tags in it and I'm trying to pull the tags

Dropping a table in MySQL (3.23.58) with a special character in the tablename

mysql mysql-management

Yes this is an old db (we are in the process of migrating). Somehow, phpMyAdmin let a user create a table with a ' in it.