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
It's too dangerous to use too much hardcode to judge the direction of scrollView #5
Comments
The thing is just the direction won't do it since I need to change the color exactly halfway through the animation. |
Yeah,this solution is a bit verbose,because you should write code for different size screen,I think the stackoverflow solution is better because you can write code once,but for all size of screen it can work well. |
New 0.1.1 release uses more abstract values to work with all screen sizes. I might do some more refactoring in the future but this version should do for now. Let me know if there is something specific you'd change. |
Thanks On Tuesday, 29 March 2016, Marek Fořt notifications@github.com wrote:
|
As you can see,in the
SwipViewController
'schangeButtonColor
method,there are too much hard code to judge the direction of the scrollView,there are manyif else
things,and all of theseif else
do not cover all scope,you just consider the scope from -374 to 374,so how it work on iPhone 6 plus,iPhone 6 plus's screen width is 414,it is out of the scope you considered.I think this issue maybe has a better solution,like this https://stackoverflow.com/questions/2543670/finding-the-direction-of-scrolling-in-a-uiscrollview
How about you?
The text was updated successfully, but these errors were encountered: