Reputation: 25619
I have two different projects - both have the same settings/build configurations (I went over everything.. couldn't find any difference) and they both contain a reference to the same XIB file - the XIB file is designed for iPhone 4
Here's the code I use for loading the nib:
CGRect frame = [[UIScreen mainScreen] bounds]];
UnregScreen *screen = [[UnregScreen alloc] initWithFrame:frame];
[screenControl_ pushScreen:screen]; // Adds the view to the root view
...
// Inside UnregScreen:initWithFrame:
self = [super initWithFrame:frame];
NSArray *bundleObjects = [[NSBundle mainBundle] loadNibNamed:@"UnregScreen" owner:self options:nil];
for (id object in bundleObjects) {
[self addSubview:object];
}
On project 1: it works fine both on iPhone 4 AND iPhone 6.
On project 2: It works fine for iPhone 4, but on iPhone 6 it does not auto resize the width the of xib, so it looks like this (notice the white margin on the right):
I'm banging my head against the wall as EVERYTHING is the same. this is the SAME xib on BOTH projects - on project 1 it's fine, on project 2 it isn't.
Where should I look??
Upvotes: 0
Views: 96
Reputation: 2813
Check "Targets->General->App Icons and launch Screens" if you specify a launch screen file the app will be rendered in native iPhone 6 resolution. While the other project is rendered in iPhone 5 scaled resolution.
Upvotes: 1