沒查到相關資料 ,說起來其實也挺簡單的,就是使用UIImage的初始化函數重新初始化- (UIImage *)imageWithScale:(CGFloat)scale{
    return [UIImage imageWithData:UIImageJPEGRepresentation(self, 1) scale:scale];
}
//swift的代碼就不寫了

//獲得的UIImage能夠適應UIButton的無鋸齒縮放