Skip to content

Commit

Permalink
Merge pull request #19 from gauravkeshre/master
Browse files Browse the repository at this point in the history
fixed an issue with jumpy UI when the content offset is customized. T…
  • Loading branch information
cemolcay committed Nov 7, 2017
2 parents 19ab6c2 + 94f596c commit a843cc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ public class SlidingContainerViewController: UIViewController, UIScrollViewDeleg
}

sliderView.selectItemAtIndex(index)
contentScrollView.setContentOffset(
CGPoint (x: contentScrollView.frame.size.width * CGFloat(index), y: 0),
animated: true)

var offset = contentScrollView.contentOffset
offset.x = contentScrollView.frame.size.width * CGFloat(index)
contentScrollView.setContentOffset( offset,
animated: true)

navigationController?.navigationItem.title = titles[index]
}
Expand Down

0 comments on commit a843cc5

Please sign in to comment.