Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to achieve persistent UIToolBars with hidden UINavigationBar appears to be manipulating undocumented View class
    primarykey
    data
    text
    <p>I have a toolbar at the top and at the bottom both set in the window. I am also using a UINavigationController. So I want to hide the nav bar as well. I found this question:</p> <p><a href="https://stackoverflow.com/questions/1072080/persistent-uibarbuttonitem-in-uitoolbar">Persistent UIBarButtonItem in UIToolbar?</a></p> <p>So in the app delegate I did:</p> <pre><code>[window addSubview:navigationController.view]; CGRect frame = navigationController.view.frame; // What is this view??? frame.size.height -= (topToolBar.frame.size.height + bottomToolBar.frame.size.height + [UIApplication sharedApplication].statusBarFrame.size.height); frame.origin.y += topToolBar.frame.size.height + [UIApplication sharedApplication].statusBarFrame.size.height; navigationController.view.frame = frame; [navigationController setNavigationBarHidden:YES]; </code></pre> <p>The toolbars are linked in IB. This is what you can see: </p> <ul> <li>The status bar. OK.</li> <li><em>Half</em> the top toolbar</li> <li>The nav bar which obscures the bottom half of the top toolbar and a bit of the loaded view.</li> <li>Your first view with a small portion at the top hidden by the nav bar.</li> <li>The bottom toolbar is OK.</li> </ul> <p>setNavigationBarHidden just seems to move the nav bar out of the way. I can achieve what I want by explicitly setting hidden=YES on the nav bar (or a category on UINavigationBar and overriding drawRect).</p> <p>The view on the nav controller is apparently a UILayoutContainerView. This appears to be undocumented. </p> <p>So:</p> <ul> <li>Is this a good method? May it get rejected?</li> <li>Why do I get this overlapping behaviour with the nav bar? </li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload