diff --git a/Source/OnboardingViewController.m b/Source/OnboardingViewController.m index 1c50a98..0bee86f 100644 --- a/Source/OnboardingViewController.m +++ b/Source/OnboardingViewController.m @@ -348,7 +348,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { // determine if we're transitioning to or from our last page BOOL transitioningToLastPage = (_currentPage != self.viewControllers.lastObject && _upcomingPage == self.viewControllers.lastObject); - BOOL transitioningFromLastPage = (_currentPage == self.viewControllers.lastObject) && (_upcomingPage == self.viewControllers[self.viewControllers.count - 2]); + BOOL transitioningFromLastPage = (self.viewControllers.count > 1) && (_currentPage == self.viewControllers.lastObject) && (_upcomingPage == self.viewControllers[self.viewControllers.count - 2]); // fade the page control to and from the last page if (self.fadePageControlOnLastPage) {