I would like to get rid of the spacing between the top of the UIButton image and the top border of the UIButton as well as the bottom of the UIButton image and the bottom border of the UIButton (refer to attached image).
I tried to use the below code however with no avail:
newFileButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
newFileButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
newFileButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
Any suggestions are much appreciated.
Regards, Shadi.