Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the reason you haven't gotten any good answers is that it's really hard to understand your problem, i.e., your question could be clearer. So first let me see if I've understood the problem correctly. Is the problem that you don't know how to handle the case when you've pushed something on your navigation controller and is supposed to show both the back button and the split view button?</p> <p>If so, the way we've solved that problem is that the split view button is only visible in the root of the navigation controller. The side controller is usually only relevant for the detail view's root view controller anyway.</p> <p>If I've misunderstood your problem or my solution isn't applicable to your project, please let me know.</p> <p><strong>EDIT:</strong> So if you insist on doing this, here's a way to do it:</p> <pre><code>toolbar = [[UIToolbar alloc] initWithFrame:(UIInterfaceOrientationIsPortrait(interfaceOrientation)) ? CGRectMake(0, 0, 768, 44) : CGRectMake(0, 0, 703, 44)]; toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.navigationController.navigationBar addSubview:toolbar]; </code></pre> <p>On <code>viewWillDisappear:</code></p> <pre><code>[self setToolbarHidden:YES animated:animated]; </code></pre> <p>and on <code>viewWillAppear:</code></p> <pre><code>[self setToolbarHidden:NO animated:animated]; </code></pre> <p>Now you have a toolbar that you can add anything to. Well, anything that can be added to a <code>UIToolbar</code> anyway, which is almost anything.</p>
    singulars
    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.
    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