Use image framing to accommodate the non-resizable image elements found in the message on the stack, but forget where it is.
button.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
button.imageEdgeInsets = UIEdgeInsetsMake(0,-10,0,0);
[button setImage:[UIImage imageNamed:@"back-button"] forState:UIControlStateNormal];
source
share