I have added a custom button to the navigation bar\'s custom right bar button item as shown in the image.
I\'m want to be able to remove the space after the button
You can add a fixed space element with a negative width (I know, this sounds like a hack, but it works):
UIButton *aButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
aButton.frame = CGRectMake(50.0, 0.0, 60, 44);
UIBarButtonItem *aBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:aButton];
[aButton addTarget:self action:@selector(testButtonControl:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *spaceFix = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:NULL];
spaceFix.width = -5;
self.navigationItem.rightBarButtonItems = @[spaceFix, aBarButtonItem];