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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:09:02+00:00 2026-05-30T11:09:02+00:00

For testing not/retina display I’ve created an UIView with size 100×100. I’ve create 2

  • 0

For testing not/retina display I’ve created an UIView with size 100×100.

I’ve create 2 images:
– normal size (100×100)
– retina size (200×200)

I have two situations:
1) Non-Retina display + Normal Size image in background
2) Retina display + Retina Size image in background

The 1st scenario is ok.
In the 2nd scenario the image is double size and in my UIView I can see only 1/4 of the total image.

The same happens when I try to assign a background image to my UIViewController navigation bar as following:

if (IS_RETINA()) {
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:IMG_NAVIGATION_BAR_BACKGROUND_RETINA] forBarMetrics:UIBarMetricsDefault];
}
else {
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:IMG_NAVIGATION_BAR_BACKGROUND] forBarMetrics:UIBarMetricsDefault];
}
  • 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-05-30T11:09:03+00:00Added an answer on May 30, 2026 at 11:09 am

    There’s a much easier way to do this. Give the retina version of the image the same name as the non-retina version, except with a “@2x” at the end. For example, if your regular image was named foo.png, then the retina version should be named foo@2x.png.

    Then, just refer to the regular version of the filename (e.g., foo.png) at all times. When your app is running on non-retina hardware the regular image will be used, but whenever you’re on retina hardware the higher-resolution image will be used automatically. It’s easier than having to write an if statement for every image you use, plus it’ll actually work.

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

Sidebar

Related Questions

Short version: I have a Django project under development & testing (not yet into
I'm building a regression system ( not unit testing) for some Perl scripts. A
I can't seem to get it to work. Perhaps I'm not even testing it
If not, is smoke testing still used?
I'm not brand new to the concept of unit testing but at the same
Testing: return request.getCookies() == null; is not an appropriate way test. Is there another
Unit testing with C/C++: What do you teach people who either did not do
Unit testing sounds great to me, but I'm not sure I should spend any
(Not to be confused with Xunit , a popular .Net unit testing library.) Today
I am not a developer, but I have spent years testing and managing software

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.