Questions tagged [titleedgeinsets]

3 questions
6
votes
2 answers

How to remove left padding from UIButton?

How to remove left padding from UIButton? I have been created button with this code: let button = UIButton(...) button.setImage(UIImage(named: "plus")?.withRenderingMode(.alwaysTemplate), for: .normal) button.setTitle("Text", for:…
3
votes
0 answers

setTitleEdgeInsets for MacOS application

I am building and application for MacOS where I would like to have distance between NSButton border and content. Looking how I could do that I have seen there is function called setTitleEdgeInsets but it looks like it is only available for…
RuLoViC
  • 825
  • 7
  • 23
0
votes
1 answer

Swift 3 | Button Label under Image AND resize Image

I'm displaying an image on top of a button, everything is OK on iPhone 7 e.g. : I set button background color to blue to see the button frame. Since I set an aspect ratio on my button's parent view, the button size change on small device, and on…
Aximem
  • 714
  • 8
  • 27