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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:37:13+00:00 2026-06-19T03:37:13+00:00

I am trying to migrate my app for iphone 5. I have already seen

  • 0

I am trying to migrate my app for iphone 5. I have already seen the other questions in stackoverflow and still facing the some problems in correctly showing it.

CGRect screenBounds = [[UIScreen mainScreen] bounds];
    if (screenBounds.size.height == 568) {
        // code for 4-inch screen
        _backgroundimageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,500)];
        [_backgroundimageView setImage:[UIImage imageNamed:@"image1-568h@2x.png"]];
    } else {
        // code for 3.5-inch screen
        [_backgroundimageView setImage:[UIImage imageNamed:@"image1.png"]];
    }

The size I have set for backgroundimageView is 320 x370 in the size inspector and the image size of image1-568h@2x.png has a size of 640x 1136 and of image1.png is 640×733.So, for 3.5 inch screen, it should show normally and for 4-inch screen, it should resize accordingly.

But the problem is that for 4-inch screen, it doesn’t resize and ends up showing me the same as 3inch screen with some white border to cover the remaining area.

Need some guidance to solve it. Thanks.. Can point out the mistake i am doing…

  • 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-19T03:37:14+00:00Added an answer on June 19, 2026 at 3:37 am

    Why you are again allocating backgroundimageView for iPhone 5 resolutions. Just use the same IBOutlet of backgroundimageView and modify the frame and image of it.

    CGRect screenBounds = [[UIScreen mainScreen] bounds];
        if (screenBounds.size.height == 568) {
            // code for 4-inch screen
            _backgroundimageView.frame = CGRectMake(0,0,320,460);
            [_backgroundimageView setImage:[UIImage imageNamed:@"image1-568h@2x.png"]];
        } else {
            // code for 3.5-inch screen
             _backgroundimageView.frame =CGRectMake(0,0,320,370);
            [_backgroundimageView setImage:[UIImage imageNamed:@"image1.png"]];
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to migrate my app to Heroku - I have a config file
I am currently trying to migrate some websites from IIS6 to IIS7 and have
I am trying to migrate a PHP app from MySQL to SQLite, and some
I'm trying to migrate app from jboss 5.1 to 7.1 and i have error
I am trying to migrate one iphone app to wp7. Is it possible to
I'm trying to migrate my application from the old App Engine db to ndb.
I am trying to migrate to Tomcat 7 from Tomcat 6. The app uses
I'm trying to migrate django apps, and i have problem with one. When i
I'm trying to migrate to ASP.Net MVC 2 and meet some issues. Here is
I'm trying to migrate my app from MySql to Postgresql, using Rails3-pre and 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.