星空网 > 软件开发 > 操作系统

【代码笔记】页面之间的跳转效果

一,工程图。

【代码笔记】页面之间的跳转效果images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151022101909630-768527485.jpg" width="312" height="400" />

二,代码。

RootViewController.m

【代码笔记】页面之间的跳转效果
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{    /*   1,不使用动画   UIViewAnimationTransitionNone     2,从左向右旋转翻页   UIViewAnimationTransitionFlipFromLeft     3,从右向左旋转翻页,与UIViewAnimationTransitionFlipFromLeft相反   UIViewAnimationTransitionFlipFromRight     4,卷曲翻页,从下往上   UIViewAnimationTransitionCurlUp     5,卷曲翻页,从上往下   UIViewAnimationTransitionCurlDown   */  FirstViewController *firstVC=[[FirstViewController alloc]init];    [UIView beginAnimations:nil context:NULL];  //置动画块中的动画属性变化的曲线  [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];  //设置持续时间  [UIView setAnimationDuration:0.5];  //设置过渡的动画效果  [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];    [self.navigationController pushViewController:firstVC animated:YES];  //提交动画  [UIView commitAnimations];  }
【代码笔记】页面之间的跳转效果

 

 


 

原标题:【代码笔记】页面之间的跳转效果

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流