- (void)rotateViewWithAnimation:(UIView*)inView duration:(float)inDuration delay:(float)inDelay anglesInDegree:(float)inAngles
{
[UIView animateWithDuration:inDuration
delay:inDelay
options:UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction
animations:^{
float radians = inAngles * M_PI / 180.0f;
[inView setTransform:CGAffineTransformMakeRotation(radians)];
}
completion:^(BOOL)finished {
// Something to do when finish animations.
}];
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.