uinavigationcontroller - add uibutton to navigationController title bar iphone -


I just wondered if it is possible to add a UI button or icon to UIButton or Tuner Bar?

I am asking because I am continually exploring the situation to display an "About" button.

You can do this via the view controller's viewDidLoad method:

  - (zero) viewDidoadload [[Super Viewedload]; UIBarButtonItem * infoButton = [[UIBarButtonItem alloc] initWithTitle: @ "info" style: UIBarButtonItemStylePlain Target: auto operation: @selector (infoButtonSelected :)]; Self.navigationItem.rightBarButtonItem = infoButton; [Notification button]; }  

In the example about how to tap the button, you also have the method:

  - (zero) infoButtonSelected: (id) sender { NSLog (@ "button pressed"); // whatever needs to be done when the button is taped}  

Comments