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

1、设置按钮属性:
    self.titleBtn.imageView.contentMode = UIViewContentModeCenter;
    
    self.titleBtn.imageView.clipsToBounds = NO;
2、处理点击事件
- (void)titleBtnClick
{
    self.titleBtn.imageView.transform = CGAffineTransformMakeRotation(M_PI_2);
}

 

posted on 2015-11-18 00:50  森code  阅读(803)  评论(0编辑  收藏  举报