I have created navigation controller via storyboard interface and I have added 4 buttons programmatically on Navigationbar but I don’t know how should I justify it would you please help me!
here is the picture:

here is my code for buttons I know That I used rightBarButtonItems but I don’t know what should I write instead!
- (void)viewDidLoad
{
[super viewDidLoad];
UIBarButtonItem *menuButton= [[UIBarButtonItem alloc] initWithTitle:@"Menu" style:UIBarButtonItemStyleDone
target:self action:@selector(menu:)];
UIBarButtonItem *yearButton= [[UIBarButtonItem alloc] initWithTitle:@"Year" style:UIBarButtonItemStyleDone
target:self action:@selector(year:)];
UIBarButtonItem *weekButton= [[UIBarButtonItem alloc] initWithTitle:@"Week" style:UIBarButtonItemStyleDone
target:self action:@selector(week:)];
UIBarButtonItem *reportButton= [[UIBarButtonItem alloc] initWithTitle:@"Report" style:UIBarButtonItemStyleDone
target:self action:@selector(report:)];
NSArray *buttons = [NSArray arrayWithObjects:menuButton,yearButton,weekButton,reportButton,nil];
self.navigationItem.rightBarButtonItems = buttons;
}
Add flexible spacers between each of the buttons: