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...
if you don't want to subclass UIButton than you can try this,
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; for (UIView *view in button.subviews) { if ([view isKindOfClass:[UIImageView class]]) { [view setContentMode:UIViewContentModeScaleAspectFit]; } }