when someone clicks clothing, I want the UIPickerView to slide up as in the example as follows:
Can someone show a code sample please?
as dsc and Jason said, if you are using tableview, use its delegate method didSelectRowAtIndexPath , in it call an pickerview in an actionsheet.
To know how to call an pickerview in an actionsheet, check this link: Add UIPickerView & a Button in Action sheet - How?
Update:
This version is deprecated: use ActionSheetPicker instead.
You can use animation if you want a "sliding" effect
[pickerView setFrame: CGRectMake([[self view] frame].origin.x, [[self view] frame].origin.y + 480.0, [[self view] frame].size.width, [[self view] frame].size.height)];
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 0.25];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[pickerView setFrame: yourDesiredEndFrame];
[UIView commitAnimations];
It's not tested but will give you an idea
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With