The easiest one I find is simply to create a png file that has a width (left image + text width + left image) but contains only the left settings image.
Then use this as the background of your button.
The text comes from the button itself, so you can easily change the text without changing the image. If you now center the text, it will look perfect with the image on the left and next to it.
The code will look like this:
[myBtn setTitle: @"settings" forState:UIControlStateNormal][myBtn setBackgroundImage: [UIImage imageNamed:@"myBtn.png"] forState:UIControlStateNormal];
It will also be compatible with localization if you ever plan to use it in another langauge.
source share