-(void)clickShi1:(id)sender
{
CATransition *transition = [CATransition animation];
transition.duration = 0.5f;
// 使用@"oglFlip"动画
transition.type = @"oglFlip";
// 指定动画方向为上下翻转
transition.subtype = kCATransitionFromLeft;
[self.view.layer addAnimation:transition forKey:@"animation"];
// 交换视图控制器所显示的UIView中中2个子控件位置
[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:3];
}
-(void)clickTiao:(id)sender
{
CATransition *transition = [CATransition animation];
transition.duration = 0.5f;
// 使用@"oglFlip"动画
transition.type = @"oglFlip";
// 指定动画方向为上下翻转
transition.subtype = kCATransitionFromRight;
[self.view.layer addAnimation:transition forKey:@"animation"];
// 交换视图控制器所显示的UIView中中2个子控件位置
[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:3];
}
网友评论