Skip to content

Commit

Permalink
setCurrentPageIndex:animated: bugfix, resolves #35
Browse files Browse the repository at this point in the history
  • Loading branch information
ealeksandrov committed Mar 6, 2014
1 parent 7113fa0 commit 4f68750
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions EAIntroView/EAIntroView.m
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ - (void)setCurrentPageIndex:(NSInteger)currentPageIndex animated:(BOOL)animated
return;
}

_currentPageIndex = currentPageIndex;

float offset = currentPageIndex * self.scrollView.frame.size.width;
CGRect pageRect = { .origin.x = offset, .origin.y = 0.0, .size.width = self.scrollView.frame.size.width, .size.height = self.scrollView.frame.size.height };
[self.scrollView scrollRectToVisible:pageRect animated:animated];
Expand Down

0 comments on commit 4f68750

Please sign in to comment.