summary refs log tree commit diff stats
path: root/Classes/CocosOverlayScrollView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/CocosOverlayScrollView.m')
-rwxr-xr-xClasses/CocosOverlayScrollView.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Classes/CocosOverlayScrollView.m b/Classes/CocosOverlayScrollView.m index dee9dfe..9db0575 100755 --- a/Classes/CocosOverlayScrollView.m +++ b/Classes/CocosOverlayScrollView.m
@@ -100,7 +100,11 @@
100 100
101- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 101- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
102{ 102{
103 [pageControl setCurrentPage:(NSUInteger)([scrollView contentOffset].x / [scrollView frame].size.width)]; 103 int currentPage = (NSUInteger)(scrollView.contentOffset.x / scrollView.frame.size.width);
104 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
105 [defaults setInteger:currentPage forKey:@"lastSelectedMode"];
106
107 [pageControl setCurrentPage:currentPage];
104} 108}
105 109
106@end \ No newline at end of file 110@end \ No newline at end of file