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 8658813
In Process

The Archive Base Latest Questions

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

The previous posting on here about migrating to iPhone 5 only mention adding a

  • 0

The previous posting on here about migrating to iPhone 5 only mention adding a new sized launch image*
and maybe using AutoLayout if need be.

But I have a few xibs where there is a background image which fills up the whole of the screen (maybe minue the navigation and tab bar, depending upon the view). To support iPhone 5 I will now need different images for the different screen size, how is this dealt with in the xib or elsewhere?

(*incidentally what do you do if the app doesn’t use a launch image?)

  • 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-12T15:51:29+00:00Added an answer on June 12, 2026 at 3:51 pm

    Here’s a link that will actually help you. Save the launch image, iOS doesn’t automatically pick the right image if you put in a “-568h@2x.png” at the end of the file name. There are a couple of helper methods mentioned in the above link that will make your job easy.

    I have adopted the code in the links I mentioned above and here’s the helper function for Obj-C:

    -(BOOL) IsTall
    {
        return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) && ([[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale] >= 1136);
    }
    

    A little category-writing would help too.

    @interface NSString (Special)
    -(NSString*)correctImageNameForiPhone5
    @end
    
    @implementation NSString (Special)
    -(NSString*)correctImageNameForiPhone5
    {
        if([self isTall])
                return -imageNameAppendedWith_-568h@2x.png_-; //Do the correct NSString magic here
        else
                return -originalImageName-;
    }
    @end
    

    Finally, when you are accessing the UIImage object:

    NSString *filename = @"backgroundImage.png";
    UIImage *img = [UIImage imageNamed:[filename correctImageNameForiPhone5]];
    

    The assumption here is that you would have all your iPhone5-specific image file names ending with “-568h@2x”. This code sample is definitely not gonna work if you just drop it into your project, but you get the idea. It needs some NSString fixes.

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

Sidebar

Related Questions

The previous posting on here regarding deleting notifications from the notification center claim its
Here is the link : www.guidegather.com (sorry, tried posting image but cannot) If you
Im actually new to using this function.. and was using preg_replace and addslashes previous
In previous question of mine, someone had meantioned that using Semaphores were expensive in
This is my third question about posting on Facebook. Although this may be a
Well I couldn't find any previous posting to answer my question so.... I am
This has been driving me nuts, I'm posting here after a lot of looking
this is my first time posting here, but I didn't know where else to
I am posting a checkin to 4sq but keep getting 400 Bad Request. Here
I used the following code from a previous posting to detect (most of) the

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.