UIButton 设置图片显示contentmode
只设置contentmode是没有效果的
UIButton *button;
button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
[[button imageView] setContentMode:UIViewContentModeScaleAspectFill];
button.contentHorizontalAlignment= UIControlContentHorizontalAlignmentFill;
button.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;
网友评论