Will I need a separate View Controller for the new larger iPhone 5 display?
Asked Answered
W

2

1

I have a pretty general question - but I can't find a straight answer anywhere! If someone knows, please enlighten me!

I wanted to know the plan for submitting to the App Store with the new iPhone 5 dimensions. I assume that we will all need to make new graphics and separate views for all our apps if we don't want them letter boxed on the new device? So my question is, am I going to just make a new view controller that targets just this device? If so - what do I put into this code to make that happen? (as you see I've done it with the iPad view)

AppDelegate.mm

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
    } else {
        self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
    }
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

Looking forward to finding out! Thanks! Sean

Wallace answered 13/9, 2012 at 22:42 Comment(0)
H
1

You don't have to redo everything. That would be crazy. You just have to get the size of the screen or the main window instead of hardcoding a 480 point height. And set the autoresizing mask to have flexible height.

Hospitalet answered 13/9, 2012 at 22:45 Comment(0)
T
1

I have an app that was already in the app store and I wanted to update it for the new screen resolution. The simple answer is that I added a blank screenshot into the Retina 4-inch launch image. Once this was done, the app resized itself. My app is all table and web view with text and photo entry, so it resized beautifully.

I did try several things before discovering this, but I removed all other changes once I discovered that the Launch Image was the reason my app wasn't loading full screen.

Tzar answered 14/9, 2012 at 9:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.