I have a UIButton
with text "Explore the app" and UIImage
(>)
In Interface Builder
it looks like:
[ (>) Explore the app ]
But I need to place this UIImage
AFTER the text:
[ Explore the app (>) ]
How can I move the UIImage
to the right?
My solution to this is quite simple
[button sizeToFit];
button.titleEdgeInsets = UIEdgeInsetsMake(0, -button.imageView.frame.size.width, 0, button.imageView.frame.size.width);
button.imageEdgeInsets = UIEdgeInsetsMake(0, button.titleLabel.frame.size.width, 0, -button.titleLabel.frame.size.width);