Align button image to right edge of UIButton

soleil picture soleil · Sep 3, 2015 · Viewed 59.6k times · Source

There are plenty of threads about aligning a button image according to the title text, but I can't find anything about just aligning the image to the right side of the button.

This has no effect:

button.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 50);

How can one right-align the image for a button? Can it be done in the Storyboard?

Answer

Gilad Brunfman picture Gilad Brunfman · Jan 12, 2017

Semantic: Force Right-to-Left on View works for me enter image description here