0

IVe noticed in a few apple apps that when you click a text box or label a uipicker loads and then when you make your selection it disappears. Im essentially trying to recreate that. but with a little difficulty. Was wondering if anyone had a link to any such tutorial or could offer ideas on how i could recreate the same.

Thank you

Sleep Paralysis
  • 449
  • 7
  • 22
  • Your question answered here. http://stackoverflow.com/questions/6699392/popup-uipicker-when-tapping-on-uitextfield – iNeal Aug 14 '12 at 17:07

1 Answers1

0

Picker is just a UIView, you can do any kind of animation as you want with

[UIView animateWithDuration:duration  animation:^{
      //custom animation you need. For example show from the bottom. Of course, you need to set the origin frame of picker to somewhere under the screen.
      myPicker.frame = CGRectMake(0, self.view.bounds.height.y - myPicker.frame.size.height, myPicker.frame.size.width, myPicker.frame.size.height);
}];

It could be pop up from bottom or fading in/out. Anything. Then you can use the opposite animation to dismiss it.

Selkie
  • 1,773
  • 1
  • 14
  • 21