gpt4 book ai didi

swift - SWReveal - CoreAnimation 警告 : stiffness/damping must be greater than 0

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

在单独项目中运行测试后,我已将 SWReveal 集成到我的应用中。

我从 here 下载了 SWReveal(最新 = v2.4)并按照 AppCoda 上的教程进行操作.

在独立项目中我没有遇到任何问题。但是在我的应用程序中(仍然作为一组独立的 View Controller /表运行,我收到了这两个警告:

CoreAnimation: stiffness must be greater than 0.
CoreAnimation: damping must be greater than or equal to 0.

如果我禁用滚动的所有方面或启用所有方面,警告就会消失。这与我从 AppCoda 获得的示例项目不同(我在控制台没有警告输出)。

虽然这不是问题,但我想尝试了解此错误的原因。

谢谢!

最佳答案

我不是 100% 确定,我无法解释原因,我不确定这是否有任何帮助,但换行:

if (abs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold)
_dragging = YES;
else if (abs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold)
self.state = UIGestureRecognizerStateFailed;

SWRevealViewController.m -> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

到:

if (fabs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold)
_dragging = YES;
else if (fabs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold)
self.state = UIGestureRecognizerStateFailed;

似乎让我的警告消失了。

关于swift - SWReveal - CoreAnimation 警告 : stiffness/damping must be greater than 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33390184/

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