cocos2d-iphone-extensions
cocos2d-iphone-extensions copied to clipboard
CCScrollLayer: moveToPage: method doesn't call scrolledToPageNumber in the delegate
Delegate should receive scrolledToPageNumber message after user scrolls to new page but it is not sent.
How to reproduce
- ScrollLayer starts showing page 1, set selectPage:1
- Scroll to page 0, with touch input
Cause
In selectPage method prevScreen_ is set to 0. If you start in page 1 and scroll to page 0, then prevScreen_ is 0, same as currentScreen_ thus no message is sent to the delegate.