This article reprinted to http://blog.csdn.net/liuwuguigui/article/details/39494435
1.iPad on the presentmodalviewcontroller,custion size not working on iOS8 SDK. Use the following method to resolve:
In IOS 8 You can also use Uipresentationcontroller which gives for more customization options.
#define Isios8later ([[[Uidevice Currentdevice] systemversion] doublevalue]>=8.0)? Yes:no
This would work:
AboutViewController * _aboutViewController = [[AboutViewController alloc] init];_aboutViewController.modalPresentationStyle = UIModalPresentationFormSheet;if(IS_IOS8){ _aboutViewController.preferredContentSize = CGSizeMake(300, 300);}[self presentViewController:_aboutViewController animated:YES completion:nil];
In ABOUTVIEWCONTROLLER.M
- (void)viewWillLayoutSubviews{ [super viewWillLayoutSubviews]; if(!IS_IOS8) { self.view.superview.bounds = CGRectMake(0, 0, 300, 300); }}
IOS8 requires compatible content