//翻转动画 360度翻转
- (void)SwitchingView:(UIButton *)button
{
button.selected = !button.selected;
[button setTitle:@"列表" forState:UIControlStateSelected];
[UIView beginAnimations:@"animationID" context:nil];//开始一个动画块,第一个参数为动画块标识
[UIView setAnimationDuration:0.5f];//设置动画的持续时间
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationRepeatAutoreverses:NO];//设置是否自动反转当前的动画效果
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];//设置过渡的动画效果
[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:0];//页面翻转
[UIView commitAnimations];//提交动画
}
详情见任车行 搜索//翻转动画 360度翻转