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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:34:51+00:00 2026-06-11T13:34:51+00:00

Possible Duplicate: Specify images for iPad in Xcode like @2x for iPhone 4 I’m

  • 0

Possible Duplicate:
Specify images for iPad in Xcode like @2x for iPhone 4

I’m having trouble finding current conclusive information about how to properly use images based on device classes (Apple documentation being like a maze of twisted corridors, all alike). My sense is that this is something that has evolved a bit over time. Suppose I want to support non-retina and retina iphones and ipads with different images.

Here are all the permutations of filenames that I can think of:

image.png
image@2x.png

image~iphone.png
image~ipad.png
image@2x~iphone.png
image@2x~ipad.png

I could do this:

myview.xib
myview~ipad.xib

Suppose I have four devices, iPhone 3GS, iPhone 4, iPad 2, iPad 3 (or ‘new iPad’ for purists).

Let’s talk about how I would set up my xibs (i.e. I add a UIImageView, what do I choose for an image?) to use the appropriate image and how, if I use code, [UIImage imageNamed:@"image"] would behave.

It’s my understanding that in code I could fall back on UI_USER_INTERFACE_IDIOM() but I’m not convinced that I need to.

If someone could explain what will and won’t work, I know that it’ll be a help to me, and I suspect to others. If I’ve somehow duplicated another SO question I couldn’t find, well, we can close this up and link to it. Thanks!

  • 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-11T13:34:52+00:00Added an answer on June 11, 2026 at 1:34 pm

    in iphone xib you have to use image~iphone. on ipad xib you have to use image~ipad. @2x is automatic selected when file is needed.

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

Sidebar

Related Questions

Possible Duplicate: How do I specify the equivalent of volatile in VB.net? What is
Possible Duplicate: How can I specify the latest time of day with DateTime I
Possible Duplicate: When do I need to specify the JavaScript protocol? for example <body
Possible Duplicate: Mysql Offset Infinite rows Is it possible to specify a query in
Possible Duplicate: Specify Command for MenuItem in a DataTemplate I have a collection of
Possible Duplicate: How can I specify system properties in Tomcat configuration on startup? What
Possible Duplicate: Any way to specify optional parameter values in PHP? just randomly came
Possible Duplicate: Do you ever need to specify javascript: in an onclick? What is
Possible Duplicate: SQL Delete: can't specify target table for update in FROM clause I
Possible Duplicate: GCC STL bound checking Is there something like a automatic debug version

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.