通过(M_PI / 2)控制旋转角度
_userPic = [UIButton buttonWithType:UIButtonTypeCustom];
_userPic.frame = CGRectMake(2, 10, 38, 38);
_userPic.transform=CGAffineTransformMakeRotation(M_PI / 2);
[self addSubview:_userPic];
通过(M_PI / 2)控制旋转角度
_userPic = [UIButton buttonWithType:UIButtonTypeCustom];
_userPic.frame = CGRectMake(2, 10, 38, 38);
_userPic.transform=CGAffineTransformMakeRotation(M_PI / 2);
[self addSubview:_userPic];