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 *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

Analytic Code