I have the following code in viewDidLoad
to add two buttons on the right of a UINavigationBar
- I omitted the code of the left "Cancel" button.
UIBarButtonItem *doneButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone
target: self
action: @selector(done:)];
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemAdd
target: self
action: @selector(add:)];
NSArray* buttons = @[addButton, doneButtonItem];
self.navigationItem.rightBarButtonItems = buttons;
Works great, but it doesn't look good, the "+" symbol seems bigger than the word "Done" and they appear off center of each other:
Is there a way to make this look nicer?