Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2sui opened this issue Apr 8, 2016 · 1 comment

Comments

@2sui
Copy link

2sui commented Apr 8, 2016

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
Copy link
Author

2sui commented Apr 8, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant