PullToBounce
PullToBounce copied to clipboard
What is the connection between `Screen size` and `bendDistance` on different devices?
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?
When bendDistance equal to pullDistance, it works well on all devices...