设置按钮中的图片的旋转,并且旋转之后不变形

1、设置按钮属性:
    self.titleBtn.imageView.contentMode = UIViewContentModeCenter;
    
    self.titleBtn.imageView.clipsToBounds = NO;
2、处理点击事件
- (void)titleBtnClick
{
    self.titleBtn.imageView.transform = CGAffineTransformMakeRotation(M_PI_2);
}
原文地址:https://www.cnblogs.com/fs-ios/p/4973343.html