UIImage *image = [[UIImage imageNamed:@"lt_ic_my"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[btn setImage:image forState:UIControlStateNormal] ;
默认情况下,图像的渲染模式uiimagerenderingmodeautomatic,我们需要的是UIImageRenderingModeAlwaysOriginal
UIViewContentModeScaleAspectFill, // 这是整个view会被图片填满,图片比例不变
网友评论