首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

生手自定义 UIView的push和pop动画贴换效果

2012-09-23 
新手自定义UIView的push和pop动画贴换效果- (void)pushAnimationDidStop {}- (void)pushViewController: (

新手自定义 UIView的push和pop动画贴换效果

- (void)pushAnimationDidStop {}- (void)pushViewController: (UIViewController*)controller    animatedWithTransition: (UIViewAnimationTransition)transition {  [self pushViewController:controller animated:NO];  [UIView beginAnimations:nil context:nil];  [UIView setAnimationDuration:0.6f];  [UIView setAnimationDelegate:self];  [UIView setAnimationDidStopSelector:@selector(pushAnimationDidStop)];  [UIView setAnimationTransition:transition forView:self.view cache:YES];  [UIView commitAnimations];}- (UIViewController*)popViewControllerAnimatedWithTransition:(UIViewAnimationTransition)transition {  UIViewController* poppedController = [self popViewControllerAnimated:NO];  [UIView beginAnimations:nil context:NULL];  [UIView setAnimationDuration:0.6f];  [UIView setAnimationDelegate:self];  [UIView setAnimationDidStopSelector:@selector(pushAnimationDidStop)];  [UIView setAnimationTransition:transition forView:self.view cache:NO];  [UIView commitAnimations];  return poppedController;}


热点排行