UIButton *addButton = [UIButton buttonWithType:UIButtonTypeCustom];
[addButton setImage:[UIImage imageNamed:@"addButton.png"] forState:UIControlStateNormal];
[addButton addTarget:self action:@selector(addSubProperty:) forControlEvents:UIControlEventTouchUpInside];
[addButton setFrame:CGRectMake(0, 0,51,44)];
UIBarButtonItem *firstBarButton = [[UIBarButtonItem alloc] initWithCustomView:addButton];
UIButton *deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
[deleteButton setImage:[UIImage imageNamed:@"deleteButton.png"] forState:UIControlStateNormal];
[deleteButton addTarget:self action:@selector(deleteProperty:) forControlEvents:UIControlEventTouchUpInside];
[deleteButton setFrame:CGRectMake(0, 0,50,44)];
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
[negativeSpacer setWidth:-10];
UIBarButtonItem *secondBarButton = [[UIBarButtonItem alloc]initWithCustomView:deleteButton];
NSArray *navBtnArr = [[NSArray alloc] initWithObjects:negativeSpacer,firstBarButton,secondBarButton, nil];
self.navigationItem.rightBarButtonItems = navBtnArr;
After this i got this result ,as you guys can see i did able to manage move my first barbutton left byt that negativeSpacer but i donot know how to reduce space between those two button.
and by doing this my back also goes disappear any idea will really appreciated .
Using Xcode 6.4, This worked beautifully for me with 1 line of code! https://stackoverflow.com/a/26469607/3634990
Note, this moves the image location, but not the touch area, so it's a great fix only if you want to move the image just a little bit.