Pavel Yakimenko Pavel Yakimenko - 5 months ago 23
iOS Question

iPhone UIButton - image position

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?

Answer

Set the imageEdgeInset and titleEdgeInset to move the components around within your image. You could also create a button using those graphics that is full size, and use that as the background image for the button (then use titleEdgeInsets to move the title around).