Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems like <code>self.navigationItem</code> is only looked at by the UINavigationController (controller, not bar). The bar itself isn’t going to check that. </p> <p>So you should either</p> <p>1) Use a real UINavigationController which comes with its own navigationBar and will handle the navigationItems for you. The self.navigationItem code above will work in that case. (you should consider <code>self.navigationItem.title = @"Status";</code>)</p> <p>If your UITableViewController is going to be pushing stuff on and off the navigation stack, this is the path you should take in any case.</p> <p>2) Use the UINavigationBar’s own navigation item. Except it doesn’t seem to come with a navigation item, so you have to add your own: </p> <pre><code>UINavigationItem *navItem = [[UINavigationItem alloc] initWithTitle:@"Status"]; [navBar setItems:[NSArray arrayWithObject:navItem]]; [navItem release]; </code></pre> <p>and then set the left and right buttons as</p> <pre><code>[navBar topItem].leftBarButtonItem = add; [add release]; [navBar topItem].rightBarButtonItem = home; [home release]; </code></pre> <p>Dealing with UINavigationController/UINavigationBar/UINavigationItem can be confusing, but luckily Apple has a decent explanation of how all these things work together at the top of its <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html" rel="nofollow">UINavigationController documentation</a>.</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.
    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.
    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