Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your app delegate, you will need to add/replace the following code in <code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</code></p> <pre><code>CGRect screenBounds = [[UIScreen mainScreen] bounds]; if (screenBounds.size.height == 568) { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_4inch" bundle:nil]; } else { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; } </code></pre> <p>where <code>ViewController_4inch</code> is the name of the nib file that is designed for iPhone 5 screen</p> <p><strong>UPDATE (STORYBOARD-SPECIFIC ANSWER):</strong></p> <p>To load different storyboards on launch, use this code:</p> <pre><code> CGSize iOSDeviceScreenSize = [[UIScreen mainScreen] bounds].size; if (iOSDeviceScreenSize.height == 480) { // Instantiate a new storyboard object using the storyboard file named Storyboard_iPhone35 UIStoryboard *iPhone35Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone35" bundle:nil]; // Instantiate the initial view controller object from the storyboard UIViewController *initialViewController = [iPhone35Storyboard instantiateInitialViewController]; // Instantiate a UIWindow object and initialize it with the screen size of the iOS device self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Set the initial view controller to be the root view controller of the window object self.window.rootViewController = initialViewController; // Set the window object to be the key window and show it [self.window makeKeyAndVisible]; } if (iOSDeviceScreenSize.height == 568) { // iPhone 5 and iPod Touch 5th generation: 4 inch screen // Instantiate a new storyboard object using the storyboard file named Storyboard_iPhone4 UIStoryboard *iPhone4Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone4" bundle:nil]; UIViewController *initialViewController = [iPhone4Storyboard instantiateInitialViewController]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = initialViewController; [self.window makeKeyAndVisible]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload