butchcowboy
butchcowboy

Reputation: 565

iPhone SDK: pushViewController not resizing view as expected

Trying to figure out why my view is being pushed up into the nav controller. From, the documentation...

"The view is automatically resized to fit between the navigation bar and toolbar (if present) before it is displayed."

In my case it is not. The view doesn't seem to take into account the fact a nav bar is there.

Any ideas?

MultiSalesViewController *childController;

childController = [[MultiSalesViewController alloc] initWithNibName:@"MultiSalesView" bundle:nil];

[self.navigationController pushViewController:childController animated:NO];

Upvotes: 1

Views: 759

Answers (2)

Kris Markel
Kris Markel

Reputation: 12112

If it's "covering" the nav bar completely, it's likely that you're either setting the navigationBarHidden to YES or calling setNavigationBarHidden:animated: somewhere. Most like in viewDidLoad or viewDidAppear or viewWillAppear in MultiSalesViewController.

It may be possible to set this in Interface Builder as well, but I couldn't find anything obvious.

Upvotes: 1

logancautrell
logancautrell

Reputation: 8772

My guess would be that your autoresize masks are not set properly in Interface Builder. Double check them inside IB on the inspector.

Upvotes: 1

Related Questions