You can use the following code to animate the selection view after clicking the button:
-(IBAction)button:(id)sender { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.6]; CGAffineTransform transfrom = CGAffineTransformMakeTranslation(0, 200); PickerView.transform = transfrom; PickerView.alpha = PickerView.alpha * (-1) + 1; [UIView commitAnimations]; }
Remember to add the following code to your viewDidLoad method
PickerView.alpha = 0; [self.view addSubview:PickerView];
What he does is that the pickup selection falls from the top of the screen on the 1st click and to disappear the selection view, you can just simply click on the button. From the next click, the selection view appears and disappears .. We hope this helps and works :)
source share