views:

99

answers:

1

Hello,

I want a UIPicker to popup instead of the keyboard when I click on a text field. Is this possible, I've been googling for awhile but can't find anything.

Does anyone have any sample code ?

Regards, Stephen

+1  A: 

Here is a good tutorial to create a UIPicker yourself UIPicker tutorial. Then you can use [self presentModalViewController:picker] to present a modal view controller when user click on the text field. I hoped that you know how to handle text field event

vodkhang
Thanks for the help, I've gone back and looked over other questions I've posted, and thanked people for there help, where it was given.
Stephen
Not just thannks for people help. Their is a button under vote up/down that you can accept answer.
vodkhang
I get a popup box telling me that I need a reputation of 15 to vote up.
Stephen
Okay, sorry I see what your saying now. This button is not very clear, I'll back over my posts now. Sorry for any confusion.
Stephen
I'm having a little trouble with the following code:pvController = [[PickerViewController alloc] initWithNibName:@"PickerView" bundle:[NSBundle mainBundle]];[window addSubview:pvController.view];It's giving me errors stating that pvController is not declared. I don't see anywhere in the tutorial that declares this value.
Stephen
I've fixed this problem, please ignore the previous comment.
Stephen