tags:

views:

48

answers:

2

Hi All,

I have a strange issue going on which I can't fathom. I have a number of uiViewControllers which I'm pushing onto a NavigationController - all fairly regular stuff. It's a bit of a drill-down application so after you've moved through 3 screens, the next view to be pushed doesn't actually appear - only the title changes in the Nav Bar. I'm pushing it the same way as all the others:

DisplayViewController *tempDispController = [[DisplayViewController alloc] initWithNibName:@"DisplayVC" bundle:nil];
    [self.navigationController pushViewController:tempDispController animated:YES];
    [tempDispController release];

The new title is set in the ViewDidLoad of the new ViewController - and that does animate in, but the actual view is still the old one.

EDIT: Forgot to say that it does load fine occasionally. Usually the first time but then not the next few times. Sometimes not even the first time.

Any ideas?

Thanks..

A: 

It sounds like the view controller is being pushed onto the stack, but its view has no content.

gerry3
Sorry - I meant to include the fact that it does load occasionally. Usually the first time is fine, but then not again for a while. I've updated my original question! Thanks.
Craig
A: 

Solved it.. the viewController calling it was running a synchronous network call which hadn't completed by the time I was calling the next viewcontroller..

So, just made it an asynchronous connection and waited for the response before moving on. Also makes it better for showing progress to the user - and error handling.

Thanks for the responses though!

Craig