UIButton 设置图片显示 contentmode

UIButton 设置图片显示contentmode

只设置contentmode是没有效果的


UIButton *button;

 button.contentEdgeInsets = UIEdgeInsetsMake(0000);

[[button imageViewsetContentMode:UIViewContentModeScaleAspectFill];


 button.contentHorizontalAlignmentUIControlContentHorizontalAlignmentFill;

 button.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;

你可能感兴趣的:(UIButton,contentMode)