There is no standard way to do this.
I faked it by using UIActionSheetand setting the view controller view as a subitem of the action sheet, and then dropping the borders of the action sheet. This is a rather strange hack, and I would not recommend it.
sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
sheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
UIViewController *modalController = [[UIViewController alloc] initWithNibName:@"SomeNib" bundle:nil];
sheet.autoresizesSubviews = NO;
[sheet addSubview:modalController.view];
[sheet showInView:self.view];
[UIView beginAnimations:nil context:nil];
[sheet setBounds:CGRectMake(0, 0, 320, 728)];
[UIView commitAnimations];
The obvious drawbacks here are the uncontrolled events of the normal vision controller ( viewWillAppear:, viewDidAppear:etc.)
source
share