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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:59:55+00:00 2026-06-12T18:59:55+00:00

For my app’s loading screen and splash screen, I used up with two different

  • 0

For my app’s loading screen and splash screen, I used up with two different methods to display my iPhone 3, iPhone 4 and iPhone 5 images appropriately.

For the loading screen, simply adding -568h@2x to your image is enough to support iPhone5.

For the splashscreen, I used a series of (if height == ) cases to check the height of the UIScreen’s bounds and sourced the appropriate image to the image view. It was apparent to me here that the -568h isn’t universally recognized as an iPhone 5 image. It is only applicable to the loading screen.

Now, in my AppDelegate, I’m setting a the background image. All my subviews have a transparent background, so they are supposed to show through to the background image. However, I am having the most trouble setting up the background image here.

Simply passing in the “Background.png” Adding the -568h@2x to the end of the filename does not work. It will do the non-retina and the 3.5” retina display, but will not pick up for the 4” display.

ie:

self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];

If I use the above snippet of code, the iPhone4 picture is used instead of the iPhone5 picture and this is not what I want.

I moved onto trying to do the same thing as I did with the splashscreen. I had a bunch of if cases:

CGFloat height = [UIScreen mainScreen].currentMode.size.height;

if ( height == 1136 )
{
     //Choose image here
}
else if (height == 960)
{
     //Choose image here
}
else if (height == 480)
{
     //Choose image here
}
self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:chosenImage]];

But the colorWithPatternImage function thinks that the chosenImage goes by 1 point = 1 pixel. So I end up with a non-retina picture attempting to fit onto the iPhone 5 screen. What exaclty does it look like? Looks like only the top left quadrant of the image I wanted is displayed over the entire iPhone 5 screen. It looks like no retina scaling was applied.

I need the iPhone to recognize that I have a retina-friendly iPhone 5 picture to be used as the background. How do I do this?

  • 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-12T18:59:56+00:00Added an answer on June 12, 2026 at 6:59 pm

    I found this code here, perhaps it helps you:

    UIImage *tmpImage = [UIImage imageNamed:@"background-568h@2x.png"];
    UIImage *backgroundImage = [UIImage imageWithCGImage:[tmpImage CGImage]
                                                   scale:2.0
                                             orientation:UIImageOrientationUp];
    self.window.backgroundColor = [UIColor colorWithPatternImage:backgroundImage];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app is saving some images on the SD Card, in the AppImages directory
My app is working very fine on iPhone and Simulator with iOS 6, but
The app in question is already localized into a few languages, but I'm adding
App is in prism/mvvm/mef and uses loading by attribute like StockTraderRI. My shell window
App I'm working on uses ARC. I wanted it to process large files, so
/app/config/parameters.ini [parameters] database_driver = pdo_mysql database_host = localhost database_port = database_name = my_dbname database_user
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
My app will no longer run under Snow Leopard, even though it was originally
My app got rejected by Apple three times, all with the same rejection letter,

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.