0
votes

I programmatically create a tabBarViewController and then set one of its tabbed view controllers as a NavigationController. In my other two views presented by the tab bar controller, which are subclasses from UIViewController, the view is sized to account for the TabBar. But in views presented by the NavigationController, the view is not sized to account for the tabBarController. Is there a property of the Nav or Tab controller I can change so that views presented by the NavController automatically account for the presence of the TabBar? I realize I can programmatically set the bottom of the view presented by the navigation controller, but this would be quite unwieldy.

Thank you.

1

1 Answers

1
votes

In IB, if you select your view controller, and look at the "View Controller" section in the Attributes Inspector, you will see that the default is for the view to be "Under Top Bars", and "Under Bottom Bars". If you don't want that behavior, then deselect one or both of those boxes. The code equivalent of this is the edgesForExtendedLayout property of UIViewController.