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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:23:56+00:00 2026-06-07T17:23:56+00:00

How would I create device specific xibs? I made one for iPhone that is

  • 0

How would I create device specific xibs? I made one for iPhone that is universal, but how can I use separate xib files?

  • 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-07T17:23:58+00:00Added an answer on June 7, 2026 at 5:23 pm

    From the Apple Resource Programming Guide:

    Note: If you are developing a Universal application for iOS, you can use the device-specific naming conventions to load the correct nib file for the underlying device automatically. For more information about how to name your nib files, see “iOS Supports Device-Specific Resources.”

    In the “iOS Supports Device-Specific Resources” document, it says this:

    To associate a resource file with a particular device, you add a custom modifier string to its filename. The inclusion of this modifier string yields filenames with the following format:

    basename – device.filename_extension

    The string represents the original name of the resource file. It also represents the name you use when accessing the file from your code. Similarly, the string is the standard filename extension used to identify the type of the file. The string is a case-sensitive string that can be one of the following values:

    • ipad – The resource should be loaded on iPad devices only.
    • iphone – The resource should be loaded on iPhone or iPod touch devices only.
      You can apply device modifiers to any type of resource file.

    So if you wanted separate .xib files, you would include the iPad xib called “MyView-ipad.xib” and the iPhone xib called “MyView-iphone.xib”.

    Once you have these files included in your project, when you call this:

    UIViewController *someViewController = [[someViewController alloc] initWithNibName:@"MyView" bundle:nil];
    

    Depending on which device your application is running on, the correct xib file will be loaded.

    Hope this helps!

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

Sidebar

Related Questions

I would like to create a device that will log when a person falls
I would like to create a table to store device settings. The table has
I want a program that would help me create virtual devices on a virtual
Versioning If your events changes you would create a new version of that event,
I need to have script.sh , that would create files f1.txt and f2.txt with
How would I create a Mongoid model that has the ability to be saved
How would I create a DecimalFormat that would only have seven digits total and
I am trying to create an app that makes use of the camera on
I have a code that has a large number of malloc s and device-specific
Here is my problem : I would like to create a specific component with

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.