Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,235
126
how do i make a picker pop up from a textfield?



I'm using the regular picker (not date picker), as I'm customizing it to show percentages on one textfield and to implement that percentage automatically to the next textfield which is the final charge amount.


can anyone help?
 
When you click on a text Field (but i'd rather not make it an textfield, since it's gonna be filled up with an picker..), you have delegate methods of UITextField -> which is UITextFieldDelegate.
There you can say, if starts editing, in that method you can do this ->
- Create a picker view in IB.
- Present picker in a Popover
- tadaaaa
 
I've been told to create a separate UIView that contains my picker view and to put a border on it so it looks like a popup/alert. and than add it to my main view and make it invisible, and have the touch action set view to visible when a user clicks on the text field



but i particularly don't know how to do this, a bit complex for an amateur.
 
...but i particularly don't know how to do this...

So, you haven't tried anything yet? If so, what help (be specific) are you expecting from us?

...a bit complex for an amateur.

What are you doing / using to learn the fundamentals of iOS Development? If you're using books, what are they (names, editions, authors)? If online tutorials, provide links. Something else? Please elaborate. Remember, be specific.
 
So, you haven't tried anything yet? If so, what help (be specific) are you expecting from us?



What are you doing / using to learn the fundamentals of iOS Development? If you're using books, what are they (names, editions, authors)? If online tutorials, provide links. Something else? Please elaborate. Remember, be specific.

I've only read the book iPad iOS 4 Development Essentials - Xcode 4 Edition by Neil Smith.



i need to know how to make the pickerview into a popup from the textfield, can u guys tell me how to code it?


how do i code the touch action part when u touch the text field to the picker view pop up, and how do i connect the secondary UIView (where the picker view popup is going to be) with the first UIView that has all my text fields, and how do i make it invisible till u touch the textfield?
 
I've only read the book iPad iOS 4 Development Essentials - Xcode 4 Edition by Neil Smith.

Apparently Chapter 18 of that book covers "Using the UIPickerView and UIDatePicker Components in iOS 4 iPad Applications" and Chapter 19 is about "An iOS 4 iPad UIPickerView Example". Since I don't have the book itself, I don't know the details of those chapters, but sounds like they might cover at least half of the issue you're trying to solve. As for the other half, does that book cover UITextFieldDelegate methods?
 
Apparently Chapter 18 of that book covers "Using the UIPickerView and UIDatePicker Components in iOS 4 iPad Applications" and Chapter 19 is about "An iOS 4 iPad UIPickerView Example". Since I don't have the book itself, I don't know the details of those chapters, but sounds like they might cover at least half of the issue you're trying to solve. As for the other half, does that book cover UITextFieldDelegate methods?




the tutorial and examples were very simple, didn't cover what i needed. and no they did not go over the textfield delegate methods.


i can make the picker i just need to know how to make it a pop up/hidden till i press the textfield and link it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.