views:

362

answers:

0

I have a UITableViewController which displays its own top navigation bar when it's presented modally, but uses the UINavigationController navigation bar when it's pushed onto the navigation stack.

I currently have code which programmatically moves origin of the table view depending on whether it has the navigation bar. When it uses its own navigation bar, the table view starts right below it. If it uses UINavigationController's navigation bar, the table view's origin starts at the very top (zero y-coordinate).

Would using a UIView autoResizingMask be able to handle this situation automatically? If so, how should I set up the toolbar and main view in my XIB?

Here's my XIB and view hierarchy to clarify:

View document hierarchy

XIB