//旋转
UIImageView
*imageView = [[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(15,
15
,
15
,
15
)];
imageView. image = NAV_UP ;
//0 - 180
[
UIView
animateWithDuration
:
0.5
delay
:
0
options
:
UIViewAnimationOptionAllowUserInteraction
animations
:^{
imageView. transform = CGAffineTransformMakeRotation (( 180.0f * M_PI )/ 180.0 );
} completion : NULL ];
imageView. transform = CGAffineTransformMakeRotation (( 180.0f * M_PI )/ 180.0 );
} completion : NULL ];
//180 - 0
[
UIView
animateWithDuration
:
0.5
delay
:
0
options
:
UIViewAnimationOptionAllowUserInteraction
animations
:^{
imageView. transform = CGAffineTransformMakeRotation (( 0.0f * M_PI )/ 180.0 );
} completion : NULL ];
imageView. transform = CGAffineTransformMakeRotation (( 0.0f * M_PI )/ 180.0 );
} completion : NULL ];