I recently created an application in which I created an action sheet and added a selection view to it.
First, you need to create an object for the action sheet in your .h file, as well as its properties, as follows:
UIActionSheet *menuProperty; @property(nonatomic,retain) UIActionSheet *menuArea;
Then you need to make the following changes to your .m file
menuArea = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Done" destructiveButtonTitle:nil otherButtonTitles:nil]; // Add the picker pickerArea = [[UIPickerView alloc] initWithFrame:CGRectMake(0,185,0,0)]; pickerArea.delegate = self; pickerArea.showsSelectionIndicator = YES; // note this is default to NO [menuArea addSubview:pickerArea]; [menuArea showInView:self.view]; [menuArea setBounds:CGRectMake(0,0,320, 600)];
source share