xcode - How to add a bar button item in interface builder? -


I'm really new to iPhone development and I need help setting up my ideas.

See FirstViewController.xib in MainWindox.xib and see the name of a controller class for this view. I assign a Root Controller to the Move tool function which is linked to the option bar button object.

So when I click on this item, the current view goes to the first scene and I am able to swticht back. It works fine till now

The navigation bar from the top of the screen is displayed in the first view. But when I FirstViewController.xib , Any navigation bar is not defined (but it is displayed on the build).

This is a problem for me because I want to save the item in the first view. How do I solve it?

You have to do it with code

  UIBarButtonItem * anotherButton = [ [UIBarButtonItem alloc] initWithTitle: @ "Save" style: UIBarButtonItemStyleDone Target: Self-action: @selector added in your FirstViewController class  viewDidLoad  method (doSave :)]; Self.navigationItem.rightBarButtonItem = anotherButton; [Release another button];    

Comments