Note that there are some explanatory texts on larger screens.

plurals
  1. POHiding a UINavigationController's UIToolbar during viewWillDisappear:
    primarykey
    data
    text
    <p>I've got an iPhone application with a <code>UITableView</code> menu. When a row in the table is selected, the appropriate view controller is pushed onto the application's <code>UINavigationController</code> stack.</p> <p>My issue is that the <code>MenuViewController</code> does not need a toolbar, but the <code>UIViewControllers</code> which are pushed onto the stack do. Each <code>UIViewController</code> that gets pushed calls <code>setToolbarHidden:animated:</code> in <code>viewDidAppear:</code>. To hide the toolbar, I call <code>setToolbarHidden:animated:</code> in <code>viewWillDisappear:</code>.</p> <p>Showing the toolbar works, such that when the pushed view appears the toolbar slides up and the view resizes correctly. However, when the back button is pressed the toolbar slides down but the view does not resize. This means that there's a black strip along the bottom of the view as the other view transitions in. I've tried adding the toolbar's height to the height of the view prior to hiding the toolbar, but this causes the view to be animated during the transition so that there's still a black bar.</p> <p>I realise I can manage my own UIToolbar, but I'd like to use <code>UINavigationControllers</code> built in UIToolbar for convenience.</p> <p><a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/26694-hide-view-toolbar-when-going-back-previous-view.html" rel="noreferrer">This forum post</a> mentions the same issue, but no workaround is mentioned.</p>
    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.
 

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