2 Answers
2

You want to maintain a reference to your UIDatePicker and then you can use UIView to animate the datePicker in and out. I would wrap the picker in a UIView so you can add a hide button or associated controls.

Thanks Moshe, I'm going to try implementing this now. But one question: I would just call the slidePickerIn method when the button is clicked to initiate this new datepicker view, right?
–
ProgramGuyApr 14 '11 at 2:06

The datepicker is set up in the init method. It is the same datepicker the whole time. You can theoretically create a new one each time, but then you have to maintain a reference to it the whole time, so you can hide it again.
–
MosheApr 14 '11 at 2:12

What I mean is that I have a button on my view, when I click the button, only then do I want to see the datePicker. And when I select the date, the picker should go away and I would be back to my original view.
–
ProgramGuyApr 14 '11 at 2:17

Hang on. @Faisal, can you come to the SO chat room?
–
MosheApr 14 '11 at 2:18