Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

Commit

Permalink
scrollsToTop이 동작하지 않는 현상 수정.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jangsy7883 committed May 31, 2016
1 parent 190ff91 commit 6f3474b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion JLFullScreenPageViewController.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@version = "1.0.26"
@version = "1.0.27"
Pod::Spec.new do |s|
s.name = "JLFullScreenPageViewController"
s.version = @version
Expand Down
5 changes: 3 additions & 2 deletions JLFullScreenPageViewController/JLPageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,13 @@ - (void)pageViewController:(UIPageViewController *)pageViewController
NSUInteger fromIndex = _currentIndex;
_currentIndex = [self indexOfViewController:self.pageViewController.viewControllers.firstObject];

for (UIViewController *viewController in self.childViewControllers)
for (UIViewController *viewController in self.pageViewController.childViewControllers)
{
NSUInteger index = [self indexOfViewController:viewController];

UIScrollView *scrollView = viewController.jl_scrollView;

if (scrollView)
if (index == NSNotFound && scrollView)
{
scrollView.scrollsToTop = (_currentIndex == index);
}
Expand Down

0 comments on commit 6f3474b

Please sign in to comment.