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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:46:26+00:00 2026-05-17T20:46:26+00:00

Here is my question : I have an app running smoothly on iOS 3.0

  • 0

Here is my question :

I have an app running smoothly on iOS 3.0
I’ve been working a long time to port it to 4.0 and to include the new features.

I added iAds using Interface Builder.

I know that I have to define it programmatically to still support 3.0 devices.
I weak linked the framework. But the app crashes when loading the NIB.

Is there a way to load NIB’s depending on the firmware version ?
Let’s say I have FirstView.xib and FirstView3X.xib

How can I choose which one will be loaded depending on the firmware ?

Thanks

PS: It’s my first question on StackOverflow !

  • 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-17T20:46:26+00:00Added an answer on May 17, 2026 at 8:46 pm

    Congratulations to your first question 🙂 How do you load the nibs? It’s a good idea to split the interface into several files. I usually use a separate nib per every controller and load them using the initWithNibName:bundle: initializer. Since you supply the nib name here, you could easily customize the loading behaviour.

    If you load the nibs using the tab bar controller, you probably have all the tabs in one nib. I think I would break the tabs into separate nibs and load them programmatically:

    id tab1 = [[UIViewController alloc] initWithNibName:@"Tab1" bundle:nil];
    id tab2 = [[UIViewController alloc] initWithNibName:@"Tab2" bundle:nil];
    id tab3 = [[UIViewController alloc] initWithNibName:@"Tab3" bundle:nil];
    [tabBarController setViewControllers:[NSArray arrayWithObjects:
        tab1, tab2, tab3, nil]];
    

    And since you would now have the control over the nib names, you could easily detect the firmware version and load the correct nib:

    id tab1 = [[UIViewController alloc] initWithNibName:
        [self nibNameForCurrentFirmware] bundle:nil];
    

    As for the firmware version detection itself, I think you could use [UIDevice systemVersion].

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

Sidebar

Related Questions

This is a continuation of the question here: JBoss - does app have to
I have a question here regarding iPhone app submission. I have a free application
Here is a question that I have had for some time but never actually
I'm currently working on adding memcache to an app running on GAE/J. I have
I am sure that this question is asked may time here. I have an
thank you for taking some time to read my question. I have this app
I have a high-level/conceptual question about Shibboleth. I'm working on the front-end (running Drupal)
here's my question: I have an MVC3 C# application and I need to update
Friends, I have a question here. I'm developing an VS2010 - MVC 3 Application
The question I have here is for some reason when the getInboxUnreadMessagesCount js function

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.