iOS之动画的跳转

//点击任何处跳转到页面
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    CATransition* animTrans = [CATransition animation] ;
    animTrans.type = kCATransitionFade;
    animTrans.duration = 1;
    animTrans.timingFunction =[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
    [self.navigationController.view.layer addAnimation:animTrans forKey:nil];
    
    FirstViewController *first = [[FirstViewController alloc]init];
    [self.navigationController pushViewController:first animated:NO];
    
}

posted on 2017-06-23 09:31  程序“猿”  阅读(144)  评论(0编辑  收藏  举报

导航