Reputation: 7892
Actually I added two button (UIButtonBarItem) and assigned it to to NavigationItem's rightbarbuttonitem but only edit button is visible and add button is not visible but when we click on it it gets invoked ? chk it out my code http://pastebin.com/Ew4zPEUz
Upvotes: 0
Views: 83
Reputation: 7892
finally solved this problem .
just removed below line
self.navigationItem.rightBarButtonItem.tintColor=[UIColor clearColor]
and its works :)
Upvotes: 0
Reputation: 747
Try using this code in ViewDidload
method
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0,0,60,30);
[button setImage:[UIImage imageNamed:@"iPhoneBackButton.png"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.rightBarButtonItem=barButtonItem;
Upvotes: 2