ios-custom the size of UIModalPresentationFormSheet

ios-custom the size of UIModalPresentationFormSheet

Follow this example code to customize the size of  form sheet in ios

ModalViewController *exampleController = [[[ModalViewController alloc] init] autorelease];
exampleController.modalPresentationStyle = UIModalPresentationFormSheet;
exampleController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; ¬†//transition shouldn’t matter
[self presentModalViewController:exampleController animated:YES];
exampleController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it’s important to do this after presentModalViewController
exampleController.view.superview.center = self.view.center;

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation

Analytic Code