SWReveal - CoreAnimation warnings: stiffness / damping must be greater than 0

I included SWReveal in my application after running the tests in a separate project.

I downloaded SWReveal (latest = v2.4) from here and followed the AppCoda tutorial .

In an independent project, I had no problems. However, inside my application (still running as a set of standalone controllers / lookup tables, I get these two warnings:

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

Warnings go away if I either turn off all aspects of scrolling, or turn them on all. This is not the same as the sample project I received from AppCoda (where I do not receive any warnings to the console).

Although this is not a problem, I would like to try to understand the cause of this error.

Thanks!

+4
source share
1 answer

I am not 100% sure, I can’t explain why, and I’m not sure if this will help, but it changes the lines:

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

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

in

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

the warnings seem to be gone for me.

+4
source

Source: https://habr.com/ru/post/1613474/


All Articles