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

McBgnr

macrumors regular
Original poster
Apr 13, 2009
144
0
Hello,

I have a few text boxes in my View, one of these requires date to be entered by the user.


So I am trying this: I have taken a button which looks like textField.
I have added a UIDatePicker to my View at the bottom. And am showing it when the user clicks on the button. and I am hiding it when the user clicks on the Save button (provided seperately). However I am not sure how to slide the DatePicker like the keyboard. Any ideas?
 
off screen... means out of view? Will try that out.

Another thing, I am using the "Making content hidden by Keyboard visible" form iphoneProgrammingGuide, in an app. But it is not working? The control doesn't move at all... dont know why?
 
There's some example code (I can't recall which one - sorry) on the Apple dev site that shows you how to scroll a view so the text fields aren't covered by the keyboard when it appears. Basically you need to use that idea to slide the picker on screen.
 
Thanks for the quick responses this is working now.

My view also has a TextField in it. When the user clicks on the ButtonforDatePicker the datePicker opens and before clicking on the done button (which has been added for DatePicker elsewhere), the user clicks on the TextField then the datePicker remains and gets covered by the KeyBoard. What would be the ideal way of solving this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.