CATransition *animation = [CATransition animation];
animation.duration = 0.5;
animation.timingFunction = [CAMediaTimingFunction functionWithName:@"easeInEaseOut"];
animation.type = kCATransitionPush;
animation.subtype = kCATransitionFromTop;
[self.navigationController.view.layer addAnimation:animation forKey:@"animation"];
[UIView animateWithDuration:2.0f animations:^{
[self.view setTransform:CGAffineTransformMakeRotation(M_PI)];
[self.view setTransform:CGAffineTransformMakeRotation(0)];
}];
网友评论