更改根视图使用CA Transition的UIWindow控制器显示黑屏

时间:2017-02-09 13:46:03

标签: ios objective-c uinavigationcontroller catransition

所以问题就在这里,我希望在登录功能后更改我的根视图控制器,因为我正在使用以下代码

UIWindow *win=[UIApplication sharedApplication].delegate.window;

CATransition *transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[self.view.window.layer addAnimation:transition forKey:nil];
[UIView commitAnimations];
win.rootViewController= newRootController;

它完美无缺,但我看到过渡之间有黑屏。 任何想法如何删除,黑屏。帮助感谢。

0 个答案:

没有答案