Reputation: 71
looks all the old workaround for resizing the view (from sheet style) doesn't work on IOS 8.
Any other solutions ?
for example, the below code works on iOS 7, but not IOS 8.
UIViewController *viewController = [[UIViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
navigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:navigationController animated:YES completion:nil];
navigationController.view.superview.frame = CGRectMake(0, 0, 800, 544);
navigationController.view.superview.center = self.view.center;
Upvotes: 2
Views: 976
Reputation: 71
finally found a solution on the iOS 8, need to implement the -(CGSize)preferredContentSize on each view controller.
Upvotes: 2