【问题标题】:SWReveal - CoreAnimation warnings: stiffness/damping must be greater than 0SWReveal - CoreAnimation 警告:刚度/阻尼必须大于 0
【发布时间】:2016-01-28 04:12:26
【问题描述】:

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

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

在独立项目中,我没有任何问题。但是在我的应用程序中(仍然作为一组独立的视图控制器/表运行,我收到以下两个警告:

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

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

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

谢谢!

【问题讨论】:

  • 你解决了吗?我有同样的问题
  • 不。用 swift 编写了我自己的侧边菜单并将其集成到我的应用程序中。

标签: swift swrevealviewcontroller


【解决方案1】:

我不是 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;

似乎让我的警告消失了。

【讨论】:

    猜你喜欢
    • 2016-10-16
    • 2020-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多