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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:28:02+00:00 2026-05-26T01:28:02+00:00

Is there any way to have two .nib files with the same name? I’m

  • 0

Is there any way to have two .nib files with the same name? I’m using Xcode 4, and I want to have multiple versions of interface i.e: MainMenu.xib in different folders, so I can access them with:

[[MainMenuViewController alloc] initWithNibName:@"MainMenu" bundle:skinBundle]

where my skinBundle would be bundle from path:

skinBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"skinFolderPath" ofType:nil]

When I build application, all directories are flattened resulting only one MainMenu.nib. When I add folders as a folder references, directory tree is preserved but none of the .xib files are compiled to .nib.

Is there any way to achieve this? Or maybe better way to manage multiple versions of nibs?

  • 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-26T01:28:02+00:00Added an answer on May 26, 2026 at 1:28 am

    You can create additional targets in Xcode called “resource bundles.” These have the bundle structure (like .app or .framework bundles) but contain no binary code. Add your resources to those bundles, add the products of those targets to your main target’s “Copy Bundle Resources” stage, and then use those bundles during instantiation using code such as the following:

    NSString *skinBundlePath = [[NSBundle mainBundle] pathForResource: @"MyBundle" ofType: @"skin"]; // or whatever it's called
    if (skinBundlePath) {
        NSBundle *skinBundle = [NSBundle bundleWithPath: skinBundlePath];
    }
    

    The above snippet assumes you set the target’s wrapper extension to “skin” and named it “MyBundle”.

    In Xcode 3 (I don’t have 4 handy), you can add a target by going to Project -> New Target. Pick “Loadable Bundle” from Mac OS X (even if you’re using iOS.) Off the top of my head, you don’t need any further configuration to get it working, but you must take care that resources wind up in the right bundle when you add them.

    If that sounds overly complicated, it’s also possible to create a new project that builds a loadable bundle, and make that a dependency of your main project; again, add the build product of the subproject to your main project’s resources “Copy Bundle Resources” stage.

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

Sidebar

Related Questions

Is there any way to list all the files that have changed between two
If I am using DataMapper, and I have two databases, is there any way
Is there any way to have this: [one[two]][three] And extract this with a regex?
I have two keyboards connected to my PC, is there any way to know
Is there any way to pass values between two forms. Let's say, I have
I have two questions. First one is simple: Is there any way to control
Is there any way we can have two different Permalinks in a Wordpress blog?
I have two questions related to CUDA 4.0 Peer access: Is there any way
Is there any way to have two keyboards on the screen at once? I
Is there any way to have have only two values for the Slider Extender.

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.