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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:01:50+00:00 2026-06-16T21:01:50+00:00

I have to add support for iPhone5 to my app. Currently the appdelegate uses

  • 0

I have to add support for iPhone5 to my app. Currently the appdelegate uses a nib that is a UITabBarController, and code like this. Works fine.

[window addSubview:rootController.view];
[window makeKeyAndVisible];

rootController is an instance of UITabBarController.

So I have created a new nib for iPhone5 and changed the code to…

if ([self IsTall])
    rootController = [[[UITabBarController alloc] initWithNibName:@"MainWindow_5" bundle:nil] autorelease];
else
    rootController = [[[UITabBarController alloc] initWithNibName:@"MainWindow" bundle:nil] autorelease];
[window addSubview:rootController.view];
[window makeKeyAndVisible];

But, the screen is blank with this code, like the nib is not loading.

If I try this I get the correct nibs loading and displaying on the screen but the “MORE” button is not shown and only the first 4 tabs are shown (there are 7 tabs in the tabBarController

if ([self IsTall])
    rootController = [[rootController initWithNibName:@"MainWindow_5" bundle:nil] autorelease];
else
    rootController = [[rootController initWithNibName:@"MainWindow" bundle:nil] autorelease];
[window addSubview:rootController.view];
[window makeKeyAndVisible];

I also tried…

if ([self IsTall])
    [[NSBundle mainBundle] loadNibNamed:@"MainWindow_5" owner:rootController options:nil];
else
    [[NSBundle mainBundle] loadNibNamed:@"MainWindow" owner:rootController options:nil];

But this causes a crash on the tab buttons for the nib not declared in the plist under Main
“nib file base name” setting.

Any help very much greatly appreciated. This has stumped me for a couple of days now.
Kind Regards
Rob.

  • 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-16T21:01:51+00:00Added an answer on June 16, 2026 at 9:01 pm

    Miscellaneous thoughts:

    iPhone 5 is iOS 6. Was your app working under iOS 6 before? If not, get it working for iOS 6 first. My apps came up blank when linked against iOS 6 even if no other changes were made. That’s because view controllers work in a whole different way. So step one is to get the simple of act of launch ironed out for iOS 6. This is particularly true if you are launching into landscape; everything is totally changed in this regard.

    Do not add the subview yourself. Just set the window’s rootViewController. It adds the subview for you.

    On the whole you should NOT be loading a different nib in any case. You should be using layout to lay out the same interface in such a way that it doesn’t matter whether the screen is tall or not.

    Hope something in there will help…

    Your second code is totally illegal. Never never never say “init” except in the very same line where you just said “alloc” (except in an initializer, of course).

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

Sidebar

Related Questions

I have two doubts: 1. I would like to add some client side support
I have an add this button on the website that is rendering a border
I have found several websites pointing to using the following code to add support
I have created the DateTimePicker control. Now i want to add localization Support with
I'm trying to add generic service support to our IoC container, and I have
I have a universal iOS app with a custom view that has three buttons,
My app works fine in the simulator, and on other devices. I have an
I have updated and rebuilt my app with a new provision profile that was
I have been developing an app that supports streaming video and audio, among other
See following code carefully. Because it works perfectly. Try to add in your application.

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.