I have a problem with modalviewcontrollers that I want to present on the iPad screen. If I leave the size as it is, then it will all be well focused. But I have very little information about these views, so I need to resize them.
So, when I resize them, I cannot make them appear in the middle of the screen. Even if I manage to concentrate one of them in one orientation, she messed up in another.
Here is my current code:
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:acvc]; [nav setModalPresentationStyle:UIModalPresentationFormSheet]; [nav setModalTransitionStyle: UIModalTransitionStyleCoverVertical]; [[acvc view] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"main_bg.jpg"]]]; [self presentViewController:nav animated:YES completion:nil]; nav.view.superview.frame = CGRectMake(self.view.bounds.size.width/2 + 175, self.view.bounds.size.height/2 - 125, 350, 250);
Thanks any help, thanks.
source share