Why does a custom UIButton image not resize with the button?
I set its view mode to Scale to Fill in Interface Builder, but unlike a UIImageView image, it d
The best solution I found so far in Swift 2.1 is the following:
self.imageButton.imageView?.clipsToBounds = true self.imageButton.imageView?.contentMode = UIViewContentMode.ScaleAspectFit
This will scale the image so it has an aspect fit in the imageView.