人人中彩票

UIView Animation 动画效果

youke 2010-01-26 11:05:26 10683
作者  youke

原帖地址  http://www.gmdgyx.cn/bbs/read.php?tid-6380-fpage-48.html

最近一直研究 UIView 之间 的切换 有一点点小成就 。 发一子视图从父视图删除的切换效果代码
  1.     [UIView beginAnimations:@"View Flip" context:nil];
  2.     [UIView setAnimationDuration:1.25];
  3.     [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
  4.     
  5.     UIViewController *coming = [[UIViewController alloc] init];
  6.     UIViewController *going =  [[UIViewController alloc] init];
  7.     UIViewAnimationTransition transition;
  8.     
  9.     coming.view = self.view.superview;
  10.     going.view = self.view;
  11.     transition = UIViewAnimationTransitionCurlUp;
  12.  
  13.     
  14.     [UIView setAnimationTransition:transition forView:self.view.superview cache:YES];
  15.  
  16.     [coming viewWillAppear:YES];
  17.     [going viewWillDisappear:YES];
  18.     [going.view removeFromSuperview];
  19.     [going viewDidDisappear:YES];
  20.     [coming viewDidAppear:YES];
  21.     
  22.     [UIView commitAnimations];
彩票软件大全 彩票合买平台 天天中彩票 易赢彩票 五分排列3 彩票分析预测 2元彩票 彩票高手 手机购彩app 人人中彩票