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

Overriding scrollViewDidScroll in README.md #28

Closed
pbrewczynski opened this issue May 11, 2014 · 1 comment
Closed

Overriding scrollViewDidScroll in README.md #28

pbrewczynski opened this issue May 11, 2014 · 1 comment

Comments

@pbrewczynski
Copy link
Contributor

It think you haven't updated README.md to accommodate new changes in your library since you suggest to override

- (void)scrollViewDidScroll:(UIScrollView *)aScrollView

with the content

[self.animator animate:scrollView.contentOffset.x];

but the same thing is in your base method (and some other stuff), so you don't need to call it yourself.

Additionally you don't suggest to call superclass (which I've suggested in the pull request), what couse, interface useless, since the _isAtEnd is changed in this callback!

self.isAtEnd = (aScrollView.contentOffset.x >= IFTTTMaxContentOffsetXForScrollView(aScrollView));

If refer to that part :

"Now, to animate the view, tell the animator what time it is. For example, to tie this animation to a UIScrollView, notify the animator of time in the scroller's delegate method.

(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[self.animator animate:scrollView.contentOffset.x];
}
This will produce an effect where the view will be at 10,10 and sized 100x100 for scroll positions 0 to 30. Between scroll positions 30 and 60, the view will grow and move until scroll position 61, where it will be locked to 150, 10 and 200x200."

@jhersh
Copy link
Contributor

jhersh commented May 12, 2014

but the same thing is in your base method (and some other stuff), so you don't need to call it yourself.

This is true only if you're using IFTTTAnimatedScrollViewController, which is just a simple wrapper around a scroll view. If you're animating your own UIScrollView with Jazz Hands, you'll still need to tell the animator what time it is. I think that might be where the confusion lies?

@jhersh jhersh closed this as completed Dec 5, 2014
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

2 participants