gpt4 book ai didi

iphone - 从 View Controller 导航回来后,uiview 动画不会调用

转载 作者:行者123 更新时间:2023-12-03 19:53:29 26 4
gpt4 key购买 nike

我在 viewDidAppear 中提供无限重复的 uianimation:通过下面给出的代码

[UIView beginAnimations:@"theAnimation" context:NULL];
[UIView setAnimationDuration:2];

[UIView setAnimationRepeatCount:FLT_MAX];
[UIView setAnimationRepeatAutoreverses:YES];
[startButton setAlpha:.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];


[UIView commitAnimations];
[super viewDidAppear:YES];

但是当我使用pushViewController导航到某个页面并返回到同一个 View Controller 时,viewDidAppear正在调用,但动画不起作用。并且在使用 PresentViewController 时工作正常。请任何人帮助我。谢谢

最佳答案

尝试在动画代码之前调用[super viewDidAppear:YES];

关于iphone - 从 View Controller 导航回来后,uiview 动画不会调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14475838/

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