I have an iPhone app I am working on to make universal for iPhone and iPad. I’ve created a second main view and xib file for the iPad version and detect the iPad and set screen size. Here is my code for that:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
CGRect rect = [[UIScreen mainScreen] bounds];
[window setFrame:rect];
mainNav = [[iPadMainNavigation alloc] initWithNibName:@"iPadMainNavigation" bundle:nil];
}
else{
mainNav = [[MainNavigation alloc] initWithNibName:@"MainNavigation" bundle:nil];
}
So far I haven’t changed any other views other than the main screen, however when I navigate to other views they are slightly too big and go off screen (top and to the right). For example, I have grouped table cells that go off the screen to the right and you can’t see their ends, or the tab bar on top is only about 2/3 visible.
I’ve checked to make sure I’m not zoomed in at all. Can anyone give me any advice on why this might be happening?
You need to work with struts and springs of your view in the IB.