Closed EkkoG closed 8 years ago
The thing is just the direction won't do it since I need to change the color exactly halfway through the animation. But it's true that the values are hardcoded, kind of didn't struck me to support there other sizes (silly me - I really should have thought of it). Will look into how to change that, thanks for the suggestion.
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. I'm working on a simuliar project,it also has a simuliar animation,but the project only has few customize feature https://github.com/cielpy/CPYPagerViewController
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:
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 👍
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/fortmarek/SwipeViewController/issues/5#issuecomment-202487785
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?