Reputation: 71
I hope someone can help:
I have ported my App for the iPhone 5. All Views are Landscape only and I set the width to be 568 pixels in IB. When the App starts the main view is displayed correctly with full width. But when I call the SettingsView using presentViewController it is displayed with 460 pixels / 3.5" mode. When I dismiss the SettingsView, then the Toolbar of the main View now also is shrunk to 460 pixels. However the Graphics which I draw are still 568 pixels wide.
I did a NSLog(@"%f", self.view.frame.size.width) in the Controller's viewDidLoad method of the Settings view and it outputs 568.0 which means the view itself "knows" that it is 568 wide. Still it is displayed with only 460px.
And here's the code - nothing fancy though....
- (IBAction) showSettingsView
{
FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipSideView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:controller animated:YES completion:nil] ;
[controller release];
}
- (void)flipsideViewControllerDidFinish:(id)controller
{
[self dismissViewControllerAnimated:YES completion:nil] ;
}
I have posted the same question on the Apple develop forum, but did not get an answer yet: enter link description here
This happens on iPhone 5 device and in the simulator. Any ideas?
Upvotes: 0
Views: 1398
Reputation: 4092
If you are not using xib for UIWindow
, but using xibs for ViewController's view
_settingsController = [[CNPSettingsViewController alloc] initWithNibName:@"CNPViewController" bundle:nil];
[_settingsController setDelegate:self];
[_settingsController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
//this line solved the problem for me
[_settingsController.view setBounds:[[UIScreen mainScreen] bounds]];
Upvotes: 1
Reputation: 3296
Set the MainWindow in MainWindow.xib to "Full Screen at Launch" and simulated Metrics size to "Retina 4 Full Screen".
Upvotes: 1