UInavigatioController自定义动画显示iphone的白色背景

UInavigatioController自定义动画显示iphone的白色背景,iphone,uinavigationcontroller,core-animation,Iphone,Uinavigationcontroller,Core Animation,我想在uinavigation控制器中实现自定义动画。 我已经做了 CATransition* transition = [CATransition animation]; transition.duration = 0.20f; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; transition.type = kCATrans

我想在uinavigation控制器中实现自定义动画。 我已经做了

 CATransition* transition = [CATransition animation];
    transition.duration = 0.20f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
    transition.type = kCATransitionMoveIn;
    transition.subtype = kCATransitionFromTop;
    [self.navigationController.view.layer addAnimation:transition
                                                forKey:kCATransition];
    [self.navigationController pushViewController:viewController animated:NO];
但是当视图控制器弹出时,它会显示一个白色背景。我如何删除它
我现在不能使用presentmodelviewcontroller,因为有一些问题

我不是告诉您这样做的,但您也可以尝试这种方法

view2 *vw2=[[view2 alloc]initWithNibName:@"view2" bundle:nil];
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.80];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight 
                       forView:self.navigationController.view cache:NO];
[self.navigationController pushViewController:vw2 animated:NO];

//    [self.navigationController pushViewController:aboutShowViewController animated:YES];
[UIView commitAnimations];

这可能对你有点帮助


我正在学习。,,。

您是否将主
窗口设置为白色背景?我的窗口的背景色为黑色您无法使用
UIViewAnimationTransition
enum执行“从顶部移入”转换。
CATransition *transition = [CATransition animation];
transition.duration = 1.0f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFade;

[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:vw2 animated:NO];