just add the UIBarButtonItem with FlexibleSpace to both sides of these two buttons, as shown below.
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
View all code with two buttons.
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; UIBarButtonItem *locateMe = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStylePlain target:self action:@selector(locateMe:)]; UIBarButtonItem *request = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStylePlain target:self action:@selector(request:)]; UIBarButtonItem *menu = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStylePlain target:self action:@selector(menu:)]; NSArray *toolbarItems = [NSArray arrayWithObjects:locateMe,flexibleSpace,request , flexibleSpace, menu]; [toolBar setItems:toolbarItems animated:NO];
From XIB you can also set this UIBarButtonSystemItemFlexibleSpace , as shown below.

UPDATE: you want to add this request button with this image to the UIToolBar, and then just bring this UIImageView and button after adding the UIToolBar to the UIView , as shown below.
[self.view bringSubviewToFront:imgView]; [self.view bringSubviewToFront:btnRequest];
Paras joshi
source share