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

  • Home
  • SEARCH
  • 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 8899631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:54:15+00:00 2026-06-15T00:54:15+00:00

I am a hobbyist iOS developer (quite a beginner actually). I am currently making

  • 0

I am a hobbyist iOS developer (quite a beginner actually). I am currently making an iPhone app and trying to define a universal background image that would work on 480, 960, and the 1136 resolutions.

My idea is to put an imageview into the background with the image, and all other views on top of it would use clearColor as background; so, the background image would always be visible. The problem is that the image cannot get distorted; so, I actually have three different images to display on the various screen sizes.

The problem is that I don’t really know how to go make this concept work. I tried to search for an answer on the Internet but to no avail, which made me think that there might be a better way to do this.

Can someone get me started with the above idea or show me a way to achieve the same thing but more efficiently?

  • 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-15T00:54:17+00:00Added an answer on June 15, 2026 at 12:54 am

    Okay I believe I solved it (with the help of the bellow commenters :). Here is my code that seems to work (although it might not be the best solution; so, if you have a better way please let me know):

    UIImage *backgroundImage = [[UIImage alloc] init];
    if ([UIScreen mainScreen].bounds.size.height > 480.0f) {
        backgroundImage = [UIImage imageNamed:@"background-568h.png"];
        }
    else {
        backgroundImage = [UIImage imageNamed:@"background.png"];
        }
    
     self.window.backgroundColor = [UIColor colorWithPatternImage:backgroundImage];
    

    One important thing: even though there is no device that currently uses a four inch non-retina display, you need to use a non-retina version when you refer to the picture in your code and then include a retina version with the smaller image. So need to have a background-568h@2x.png for the referred background-568h.png in the code. Doesn’t make sense, but that’s the way it works… 😛

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

Sidebar

Related Questions

I'm a hobbyist programmer (cook by trade) that's currently trying to teach myself F#
I am a hobbyist console C++ developer. I have worked with pointers, arrays, std::vectors,
I'm a hobbyist programmer with a fair grasp of Python and I'm currently learning
So; I'm a hobbyist who's trying to work through SICP ( it's free! )
I am a hobbyist C++ programmer and currently working on a game (using Ogre3D)
I'm a C++ and Javascript developer who is learning objective-c to be a hobbyist
Tumblr's login page is an inspiration for many, and as a hobbyist developer I
Background: I have a self-taught hobbyist level of understanding of C++, which has translated
hobbyist/non-profession programmer here. I don't have a strong grasp on network addressing. I have
Being a hobbyist coder, I'm lacking some fundamental knowledge. For the last couple days

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.