沒查到相關(guān)資料 ,說起來(lái)其實(shí)也挺簡(jiǎn)單的,就是使用UIImage的初始化函數(shù)重新初始化
- (UIImage *)imageWithScale:(CGFloat)scale{ return [UIImage imageWithData:UIImageJPEGRepresentation(self, 1) scale:scale];
}
//swift的代碼就不寫了
//獲得的UIImage能夠適應(yīng)UIButton的無(wú)鋸齒縮放