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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:42:24+00:00 2026-05-17T18:42:24+00:00

According to the iOS Reference Library : In iOS 4.0 and later, it is

  • 0

According to the iOS Reference Library:

In iOS 4.0 and later, it is possible
to mark individual resource files as
usable only on a specific type of
device.

Does this mean that if you’re creating an Universal app for 3.X devices, and the 3.2 iPad in particular, you can’t use device-specific resources with the ~ipad and ~iphone sufixes?

If so, is this the correct way to deal with device-specific resources?

UIImage* anImage;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    anImage = [UIImage imageNamed:@"MyImage-iPad.png"];
} else {
    anImage = [UIImage imageNamed:@"MyImage-iPhone.png"];
}  

Any additional considerations I should know of?

  • 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-17T18:42:24+00:00Added an answer on May 17, 2026 at 6:42 pm

    Yes, you’re right, that feature does not work on current iPads – iOS 3.2.

    As a workaround I’ve created a category in UIImage, so I can use it like anImage = [UIImage mbImageNamed:@"MyImage.png"]. Category method simply puts “~iPad” before the suffix on iPad – code similar to yours.

    Another ugly thing is that UIWindowControllers do not load xib files depending on device. I’ve created a base class for all my window-controllers and load the iPad specific XIB:

    @implementation MBPadAwareWindowController
    - (id)init
    {
        NSString *className = NSStringFromClass([self class]);
        NSString *nibName = UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad ? className : [className stringByAppendingFormat:@"-iPad"];
        return [self initWithNibName:nibName bundle:nil];
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to the APNS Reference at Apple.com, an iOS device cannot receive notifications while
According the iOS CAGradientLayer docs , the type property only has a single valid
I have an iOS (Obj-C) project that uses ARC (Automatic Reference Counting). According to
bool ios::eof ( ) const; According to the library, The function returns true if
According to the UITextInputTraits Protocol Reference , the UIKeyboardTypeDecimalPad is Available in iOS 4.1
According to the Apple iOS mantra it should be possible to scroll the contents
According to Apple guidelines: What url should I use to verify my receipt (iOS)?
For iOS, I am aware that apps can upload in the background, as according
tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath is deprecated according to the iOS docs. It mentions using rowHeight
According to the GitHub, If the app is running in a version of iOS

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.