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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:39:20+00:00 2026-06-05T07:39:20+00:00

I am almost finished with the iPhone version of my app when I realized

  • 0

I am almost finished with the iPhone version of my app when I realized that I’m going to have to (probably?) write conditionals for every UI element because they use different graphics. This will make my code very messy. I have 15 different custom UI controls and I can’t imagine that setting up a conditional (“if ipad load image_ipad, if iphone load image_iphone”) for every method is the best way to do this. Can anyone suggest a particular technique for dealing with this? Or is there a way to name images like you can between retina and regular?

  • 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-05T07:39:21+00:00Added an answer on June 5, 2026 at 7:39 am

    You will need just to pass the basic image name .. lets say our image name is “Apple.png” ,, then you will write the get image name like this UIImage *image = [UIImage ImageNamed:@"Apple.png"] and the name for the image for the following cases will be :

    1.iPad > put ~ipad , image name will be "Apple~ipad.png"

    2.iPhone > put ~iphone , image name will be "Apple~iphone.png"

    3.for retina display > put @2x , image name will be "Apple@2x.png"

    4.if you have diffrenet image for retina diplay for ipad and iphone it will be like this ,, for iPad "Apple@2x~ipad.png" ,, for iPhone "Apple@2x~iphone.png"

    If you name it like this iOS will detect the best match image name and load it.

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

Sidebar

Related Questions

I have created a web app that is almost finished. I need it to
I have almost finished my iPhone app and would like to send it in
I'm almost finished with my program, but I have one problem that I can't
I've almost finished my iPhone app and I'm making test using XCode 4 and
While i finished developing an in-app-purchase application, and after several testing on iPad/Iphone, every
I'm going through Practical Common Lisp, I'm almost finished, and one question that has
I have almost finished my app for android, the problem is when i test
I have almost finished developing an Android App. I use the GPS location and
I have almost finished writing my app, and i am concerned about the app
I have an app which is almost finished and the last part is where

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.