I Have a Landscape ViewConroller,
I create and add it with :
gameVC = [[GameViewController alloc] initWithNibName:@"GameViewController"
bundle:nil];
[viewController.view removeFromSuperview];
[self.window addSubview:gameVC.view];
In the GameViewController i have the method:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if(interfaceOrientation == UIInterfaceOrientationLandscapeRight){
return YES;
}else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
return YES;
}else {
return NO;
}
}
Now the issue is that when i run the app on iphone 3(or other non-retina screen) the screen look like the xib file, and when i run it on iphone 4(or other retina screen) the UIViews on the UIViewController are in 10-20 pixles to the left.
any idea how to fix it?
Check your autosizing masks for the views in the Size Inspector in Interface Builder for the GameViewController.xib. Also, the precise size for the parent view (of the problematic views) might be the wrong size (off by a couple pixels).