Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a catch with the <code>backBarButtonItem</code> you set it on the a UIViewController, but it won't show up when that view is visible, it will show up only when that view is the one to go back to.</p> <blockquote> <p>backBarButtonItem<br> The bar button item to use when a back button is needed on the navigation bar.<br> @property(nonatomic, retain) UIBarButtonItem *backBarButtonItem<br> Discussion<br> When this navigation item is immediately below the top item in the stack, the navigation controller derives the back button for the navigation bar from this navigation item. When this property is nil, the navigation item uses the value in its title property to create an appropriate back button. If you want to specify a custom image or title for the back button, you can assign a custom bar button item (with your custom title or image) to this property instead. When configuring your bar button item, do not assign a custom view to it; the navigation item ignores custom views in the back bar button anyway.<br> The default value of this property is nil.</p> </blockquote> <hr> <p>And for the method not being called you need to set the @selector to be called </p> <p><a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UIBarButtonItem" rel="nofollow">You could use this method to create your button</a></p> <pre><code>- (id)initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action </code></pre> <hr> <p>Edit<br> For the back button<br> Don't create a UIButton, go for the UIBarButton directly.<br> Here is how I create a backBarButtonItem.</p> <pre><code>UIBarButtonItem *bbi = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Maison.png"] style:UIBarButtonItemStylePlain target:nil action:nil]; self.navigationItem.backBarButtonItem = bbi; [bbi release], bbi = nil; </code></pre>
    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