How to adjust an UIButton's imageSize?
ios, objective-c, uibutton, xcode
Solution
If I understand correctly what you're trying to do, you need to play with the buttons image edge inset. Something like:
myLikesButton.imageEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30)
Problem
How can I adjust the image size of the UIButton? I am setting the image like this: ``` [myLikesButton setImage:[UIImage imageNamed:@"icon-heart.png"] forState:UIControlStateNormal]; ``` However this fills up the image to the full button, how do I make the image smaller? Historic note: For this now 10+ yr old question, you now typically just set the point size using `setPreferredSymbolConfiguration`