gpt4 book ai didi

ios - 看到闪烁的中间过渡?

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

我刚刚尝试在 View Controller 之间进行自定义转换。它基本上将下一个旋转到 View 中,并且有效。除了源 View Controller 会在动画完成时短暂地闪烁回到可见状态,就像目标 View Controller 到达其最终位置一样。

我还收到关于对开始/结束外观转换的调用不平衡的警告,我仍在努力修复——我不知道它们是否相关。

有没有人看到这里有什么东西跳出来是因为不太正确会导致闪烁?

然后我只是分配了一个按钮来通过 Storyboard编辑器进行自定义转场。

-(void)perform
{
UIViewController *source = self.sourceViewController;
UIViewController *destination = self.destinationViewController;

[source.view addSubview:destination.view];
destination.view.transform = CGAffineTransformMakeRotation(M_PI / 2);

[UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationCurveEaseInOut animations:^{
destination.view.transform = CGAffineTransformMakeRotation(0);
}completion:^(BOOL finished){
[destination.view removeFromSuperview];
[source presentViewController:destination animated:NO completion:NULL];
}];
}

最佳答案

取出removeFromSuperview。

关于ios - 看到闪烁的中间过渡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27283430/

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