iOS >> UIButton ImageView Property >> How to set Content Mode?
问题 Is there a way to set a UIButton Image, BackgroundImage or ImageView Properties Content Mode Property? I've tried the direct approach (it didn't work, of course...): self.imageButton.imageView.contentMode = UIViewContentModeScaleAspectFit; It's nice to have a button with an image, but if there's no way to set it properly, it's not very handy... 回答1: Using iOS7/8 with auto-layout, button.imageView doesn't get scaled when button is laid out, e.g. for iPhone 6: (lldb) po button <UIButton: