I would like to have three rightBarButtonItems on navigation bar. Add,Edit and Delete.
And I can't make it using Interface Builder.
Does anybody know how to do it programmatically?
I would like to have three rightBarButtonItems on navigation bar. Add,Edit and Delete.
And I can't make it using Interface Builder.
Does anybody know how to do it programmatically?
Add an array of bar button items to navigationItem.rightBarButtonItems
UIBarButtonItem *searchButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemSearch
target:self
action:@selector(searchItem:)];
UIBarButtonItem *editButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self action:@selector(editItem:)];
self.navigationItem.rightBarButtonItems =
[NSArray arrayWithObjects:editButton, searchButton, nil];