PullToBounce icon indicating copy to clipboard operation
PullToBounce copied to clipboard

What is the connection between `Screen size` and `bendDistance` on different devices?

Open 2sui opened this issue 10 years ago • 1 comments

There is my code :

let ballSize = self.view.bounds.size.width / 12
        _pullToBounce = PullToBounceWrapper(scrollView: _collectionView,
            bounceDuration: 0.8,  /
            ballSize: ballSize,  
            ballMoveTimingFunc: CAMediaTimingFunction(controlPoints:0.49,0.13,0.29,1.61),
            moveUpDuration: 0.25, 
            pullDistance: ballSize * 2, 
            bendDistance: ballSize * 1.8, 
            didPullToRefresh: {  
                // test
                NSTimer.schedule(delay: 6) {
                    [unowned self] timer in
                    self._pullToBounce?.stopLoadingAnimation()
                }
            })

The ballSize is related to Screen bound, when i set bendDistance as benDistance * 1.8, the code works well on iPhone 6s but crashes on iPhone 5s, and then i set bendDistance as benDistance * 1.9 it crashes on iPhone 6s but works well on iPhone 5s.

What is the connection between Screen size and bendDistance on different devices?

2sui avatar Apr 08 '16 01:04 2sui

When bendDistance equal to pullDistance, it works well on all devices...

2sui avatar Apr 08 '16 01:04 2sui