I have a UINavigationController with a UIViewController (vc1) as the "root view controller". There are 3 views in the UIViewController:
- HeaderView(UIViewSubclass)
- UITableView (custom frame)
- FooterView(UIViewSubclass)
The reason that the header/footer view are separate from the uitableview is because they need to be stationary and only allow the uitableview to scroll. When the vc1 is loaded everything is PERFECTLY in place and behaves as expected. However, when click on of the cell rows, navigate to vc2 and then navigate back to the vc1 my tableview is now "under" the uinavigationbar.
Note: The root view controller (vc1) is a subclass of uiviewcontroller so that I could change the frame size for the tableview. The frame for the tableview is set in IB as (0,0, 320,300). As I stated before when the vc1 is originally loaded the tableview is aligned perfectly under the headerview, it is just when I navigate back to vc1 from vc2.
I have tried setting autoresizingMask to UIViewAutoresizingFlexibleTopMargin in viewDidLoad, but to noavail. All suggestions are greatly appreciated