【发布时间】:2013-09-22 22:02:53
【问题描述】:
所以。刚开始将我的 IOS 代码转换到 IOS7,遇到了一些问题。
我有一个UINavigationController,它有子视图控制器,我正在使用pushViewController 来显示下一个视图。要使用一组图像创建视差动画,如果自定义 UINavigationController 以动画一组 UIImageViews 和我的子 ViewControllers 都具有 self.backgroundColor = [UIColor clearColor],透明度。
从 iOS7 开始,UINavController 对其子 vc 的动画方式进行了更新,通过部分移动当前视图控制器并在顶部推动新的视图控制器,我的视差动画看起来很糟糕。我看到之前的 VC 移动了一下,然后消失了。有什么办法可以恢复之前的UINavigationController pushViewController 动画?我似乎在代码中找不到这个。
WelcomeLoginViewController* welcomeLoginViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WelcomeLogin"];
[self.navigationController pushViewController:welcomeLoginViewController animated:YES];
甚至尝试使用:
[UIView animateWithDuration:0.75
animations:^{
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[self.navigationController pushViewController:welcomeLoginViewController animated:NO];
[UIView setAnimationTransition:<specific_animation_form> forView:self.navigationController.view cache:NO];
}];
有人知道吗?
【问题讨论】:
-
为了记录,股票动画(即只是直接推动动画:YES)现在表现出相同的行为。
标签: objective-c animation uinavigationcontroller ios7 pushviewcontroller