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

self.didChangePage not being called in iOS 9 #43

Open
robmontesinos opened this issue Oct 13, 2015 · 2 comments
Open

self.didChangePage not being called in iOS 9 #43

robmontesinos opened this issue Oct 13, 2015 · 2 comments

Comments

@robmontesinos
Copy link

This was working fine until I tried it on an iOS 9 device. The pageControl also is not updating where it was working fine before I tried iOS 9. Any thoughts?

    __weak typeof(self)weakSelf = self;
    self.didChangedPage = ^(NSInteger currentPageIndex) {
        // do something
        NSLog(@"page index: %i | scrollView: %@", (int)currentPageIndex, NSStringFromCGRect(weakSelf.scrollView.frame));
    };
@Eridana
Copy link

Eridana commented Nov 26, 2015

Do your "self" have SLPagingViewController type?
Code below working on iOS 9 in my case.

SLPagingViewController *pageViewController = [[SLPagingViewController alloc] init ....];
pageViewController.didChangedPage = ^(NSInteger currentPageIndex) {
   NSLog(@"pageDidChange");
};

@robmontesinos
Copy link
Author

Thank you @Eridana - yes, "self" is appropriate since my View Controller is a sub-class of SLPagingViewController. My issue turned out to be a problem combining SLPagingViewController with a side menu drawer controller - the view hierarchy was a little bit jacked up. Happy Thanksgiving!!

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