Chinaunix首页 | 论坛 | 博客
  • 博客访问: 79737
  • 博文数量: 35
  • 博客积分: 1772
  • 博客等级: 上尉
  • 技术积分: 375
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-08 14:39
文章分类
文章存档

2012年(1)

2011年(16)

2010年(18)

我的朋友

分类: 嵌入式

2011-06-20 23:17:58

视图1:
[UIView beginAnimations:@"filpping view" context:nil];
    [UIView setAnimationDuration:1];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
   
    [self.view addSubview:detailController.view];
   
    [UIView commitAnimations];

视图2:
[UIView beginAnimations:@"filpping view" context:nil];
    [UIView setAnimationDuration:1];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view.superview cache:YES];
   
    [self.view removeFromSuperview];

翻转效果的一些简单解释:
[UIView beginAnimations:@"filpping view" context:nil]; 定义一个翻转效果
[UIView setAnimationDuration:1]; 设置动画事件
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; 设置动画开始慢,后面逐渐便快
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view.superview cache:YES];设置向右翻转,设置当前视图.

[self.view removeFromSuperview]; 执行这个动画



   
    [UIView commitAnimations];
阅读(905) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~