gpt4 book ai didi

ios - 导航栏在执行 popViewController 时闪烁黑色

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:38:02 25 4
gpt4 key购买 nike

我的应用程序需要反向弹出动画。它的部署目标是 IOS 7

所以,我已经实现了TRVSNavigationControllerTransition应用程序接口(interface)。

我有默认的半透明导航栏。它成功弹出,但在动画时闪烁黑色。

我附上了实际显示方式的图片。

感谢任何帮助。

谢谢,巴津加。 enter image description here

最佳答案

好的,下面是我用来处理这种情况的解决方案。

反向推 (即从左到右)

CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
transition.type = kCATransitionFromLeft;
[transition setType:kCATransitionPush];
transition.subtype = kCATransitionFromLeft;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];

self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:<objVC> animated:NO];

然后,反向弹出 (即从右到左)

CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
transition.type = kCATransitionFromRight;
[transition setType:kCATransitionPush];
transition.subtype = kCATransitionFromRight;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];

self.navigationController.navigationBarHidden = NO;
[self.navigationController popViewControllerAnimated:NO];

关于ios - 导航栏在执行 popViewController 时闪烁黑色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20521245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com