Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8621765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:53:28+00:00 2026-06-12T06:53:28+00:00

Trying to make my app work with both iPhone 5 and iPhone 4/4s. I

  • 0

Trying to make my app work with both iPhone 5 and iPhone 4/4s. I tried the “AutoLayout” but does not seem to work for my app also read that it is not supported in iOS 5. AutoLayout specifically fails on a view controller that has an UIScrollview and a UIPicker that is re-sized in code. Having two Storyboards one for 4 inch and one for 3.5 inch seems the way to go.

The two Storyboard aproch seem to be the solution for me. So this leaves me with two questions;

  1. Where should the code to detect then if it is a 4/4s/5 go? I would assume in the appDelegate.m in the didFinishLaunchingWithOptions method

  2. How do I change the “Main Storyboard”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:53:29+00:00Added an answer on June 12, 2026 at 6:53 am

    This is a great question.

    What you need to do is,

    1. Select your current 4/4s storyboard, go to File, duplicate, then give it an iPhone 5 specific name.
      Make sure that Target and your app name is checked.

    2. Next you have to select the scenes in your storyboard and in the Attributes Inspector change the size to Retina 4 Full Screen.
      This allows you to rearrange everything for this display.

    3. Finally in application didFinishLaunchingWithOptions paste the following code with the storyboard name you gave for your 4 inch storyboard.

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
      {
      if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
          UIStoryboard *storyBoard;
      
          CGSize result = [[UIScreen mainScreen] bounds].size;
          CGFloat scale = [UIScreen mainScreen].scale;
          result = CGSizeMake(result.width * scale, result.height * scale);
      
          if(result.height == 1136){
              storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone_5" bundle:nil];
              UIViewController *initViewController = [storyBoard instantiateInitialViewController];
              [self.window setRootViewController:initViewController];
          }
      }
      
      return YES;
      }
      

    If anyone don’t get how to do step 1, do as below.

    1. Go to Project directory and copy paste the MainStoryboard.storyboard and rename new storyboard to say MainStoryboard5.storyboard.

    2. Add this new storyboard MainStoryboard5.storyboard in project (in Xcode) by right clicking Project and clicking Add Files to ....

    3. Now we have two storyboards in xcode.

    Tip

    You may have to use ‘Product > Clean’ for this to work after you have done all the above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a app that read the outgoing signals from Arduino, but
I'm trying to make an app in CPython that should work on both linux
I'm trying to figure out how my iOS app should work after Facebook make
I am trying to make App Distribution from Facebook for android apps. But the
I am trying to make an app that will pass data between two servers
I was wondering : I'm trying to make an app that as a Listview,
If I'm trying to make my App work on older devices, I use the
I have a video app that does both a live preview as well as
I'm trying to make an app where I have 3 classes. A Controlller (Main
I'm trying to make my app a good Windows citizen, so I use matching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.