I have a navigation controller based user interface that contains a view
MainView
MainView contains a child view
MainView ChildView
and ChildView contains a preview
MainView ChildView SubView
When I push ChildView on the stack, I need to get the height of the navigation bar in the SubViewController in order to resize the content. In SubViewController I tried
self.navigationController.navigationBar.frame.size.height
and
self.parentViewController.navigationController.navigationBar.frame.size.height
and not one of them contains the height of the navigation bar. I would prefer that the height, rather than the hard code, be 44.0.
source share