Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>– setToolbarItems</code> method is a UIViewController method specific to each child view controller of your navigation controller. Assuming <code>[self navigateToCommentScreen:shouldAddNewComment]</code> pushes a new view controller onto the navigation stack you will have to set the toolbar items for the new view controller too as a separate call, regardless of what the action sheet is doing. For example, </p> <pre><code>-(void) navigateToCommentScreen:(bool) shouldAddComment{ CommentViewController* viewController = [[CommentViewController alloc] init]; [self.navigationController pushViewController:viewController animated:YES]; [viewController setToolbarItems:self.toolbarItems]; } </code></pre> <p>Otherwise the new view controller will have no toolbar items and the toolbar will be blank.</p> <p><strong>Edit</strong></p> <p>I created a navigation controller with a root view controller that has a toolbar with a UISegmented control. I pushed a new view controller onto the navigation stack via a UIActionSheet delegate method and then popped it back. The toolbar was exactly how it should be on the root view controller (the segmented control faded back in as expected). You must be doing something more complicated with your controller with regards to setting the toolbar items that is causing them to disappear. Without seeing your viewController's source methods it's hard to tell what the problem is. Make sure that you are not setting your toolbar items to nil or resetting them with an empty array somehow.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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