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

The Archive Base Latest Questions

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

I’ve a weird problem. I’m using a navigationController and want to add a subview

  • 0

I’ve a weird problem. I’m using a navigationController and want to add a subview (a MBProgressHUD) to the navigationController.view.

Everything is absolutely fine under iOS4. But if I switch WITH THE SAME PIECE OF CODE to iOS5 the app crashes because the navigationController.view is now nil.

So there must be something which works under iOS4 but not under iOS5 in my code.

Has anybody a guess what I’m doing partly wrong there? Is there any difference between iOS4 and iOS5 setting up a view?

I’m somehow lost at the moment, because I’ve no general error I can search for but more a specific ones in context of iOS5.

I know this is a really general description, but I think it would be too much to post my complete code here.

So I really appreciate every single hint because I’ve absolutely no clue what’s wrong there.

Thanks,

Andreas

Update 1:

I know that the problem occurs because of a tabBarController.

It’s the following way:

When a user clicks on a row in a UITableView, the app opens a tabBarController including three views consisting each of it with a UINavigationController and a view in it.

So I initialize this construction with:

    self.tabBarController = [[UITabBarController alloc] init];
    SomeUIViewController* tabOne = [[SomeUIViewController alloc] init];
    tabOne.tableViewContext = self.conferenceContext;

    SomeUIViewController* tabTwo = [[SomeUIViewController alloc] init];
    tabTwo.delegate = tabOne;

    SomeUIViewController* home = [[SomeUIViewController alloc] init];

    [self.tabBarController setViewControllers:[NSArray arrayWithObjects:tabOne, tabTwo, home, nil]];

    [self.navigationController pushViewController:self.tabBarController animated:YES];

    [home release];
    [tabTwo release];
    [tabOne release];

So the error seems to be within these lines of code. Because if I only init tabOne-View without the tabBar all things work perfectly also under iOS5. But if I init a tabBar with these lines of code I get the error.

Can somebody explain me what’s wrong there under iOS5 perspective, because this code works perfectly under iOS4.

Update 2 (Important)

So, I think the problem is the navController. My structure is the following: window->navController->tabBar.

And it seems to be the case, that under iOS4 the app can access the navController within a tabBarView, but not under iOS5.

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

    So, I’ve finally find out how to fix this problem. But I don’t understand why it’s only occuring only in iOS5.

    So the problem is, that I wanted to access a navController in viewDidLoad. Actually the navController is not linked until this point in iOS5. That’s why the error occurs. If I move the code snippet in viewWillAppear all works fine.

    But why this is only occuring in iOS5 and why has it worked in iOS4 with viewDidLoad?

    That’s the final question still existing in my head.

    But now the app runs in iOS5 and I’m partly happy 😉

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.