0

I'm attempting to use imageEdgeInsets but imageEdgeInsets only works with setImage not setbackgroundimage. My problem is when using setImage, the title of my image becomes hidden.

Is their a way to use imageEdgeInsets with setbackgroundimage OR having the title visible when using setImage

1 Answers1

0

It doesn't appear possible to use imageEdgeInsets with backgroundImage.

If you want Image and Title visible inside the UIButton but not overlapping use imageEdgeInset and titleEdgeInset with offset positions. example

If you want the title to appear on top of the Image use a separate UILabel constrained to UIButton.

Suggestion: next post, state what result you want in Question

Community
  • 1
  • 1
Chameleon
  • 1,608
  • 3
  • 21
  • 39