I want to create three buttons in right side of Navigation bar.I am using storyboard for creating the UIView Controller. In DetailViewController am Embedded a Navigation bar using storyboard and then creating three UIBarButtonItem programetically and then adding these in an array then assigning it to navigationitem.This is working fine.
UIBarButtonItem *Button1 = [[UIBarButtonItem alloc]initWithTitle:@"Button1" style:UIBarButtonItemStylePlain
target:self action:@selector(Button1Clicked:)] ;
UIBarButtonItem *Button2 = [[UIBarButtonItem alloc] initWithTitle:@"Button2" style:UIBarButtonItemStylePlain
target:self action:@selector(Button2Clicked:)] ;
UIBarButtonItem *Button3 = [[UIBarButtonItem alloc] initWithTitle:@"Button3" style:UIBarButtonItemStylePlain
target:self action:@selector(Button3Clicked::)] ;
self.navigationItem.rightBarButtonItems =
[NSArray arrayWithObjects:Button1,Button2,Button3, nil];
I have another viewcontroller this is a modalviewcontreoller. I am creating the view controller using storyboard and adding a navigationbar not a navigationcontroller.Then using the same method for adding buttons to navigtion bar, but not shown any buttons. Plese anyone know how to solve this issue.?