gpt4 book ai didi

swift CATransition : Is there anyway to remove the fading effect from this animation?

转载 作者:搜寻专家 更新时间:2023-10-31 23:08:59 25 4
gpt4 key购买 nike

我这里有一个动画,但是当旧的 ViewController 被推出窗口时,它会逐渐变成黑色,而新的 ViewController 会从黑色逐渐消失,这看起来不太好。有没有办法消除这种褪色效果?

    let transition = CATransition()
transition.duration = 3
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromRight

self.window?.layer.add(transition, forKey: kCATransition)
self.window?.rootViewController?.present(profilePreview,
animated:
false, completion: nil)

总体而言,我对编程还很陌生,因此我们将不胜感激。

最佳答案

回答我自己的问题,我能找到的唯一解决方案是:Custom segue transition animation

归功于 Hussain Shabbir

关于 swift CATransition : Is there anyway to remove the fading effect from this animation?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46001652/

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