Skip to content

Commit

Permalink
Fixed animation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
blsage committed Nov 4, 2020
1 parent e261bd8 commit f6e75b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Modifier or Initializer | Description
`.navigationOrientation(_ orientation: UIPageViewController.NavigationOrientation)` | Modifies the navigation **orientation** of the page view. ↔️ ↕️
`.disableBounce(_ disable: Bool)` | Disables the **bounce** settings of the page view. This is especially useful for scroll views.
`.interPageSpacing(_ spacing: CGFloat)` | Modifies the spacing between the pages. ↔️
`.animated(_ animated: Bool)` | Modifies whether the the pages jump with animation if the selection binding changes programmatically
`.animated(_ animated: Bool)` | Modifies whether the the pages animate the slide if the `selection` binding changes. 🎥


## Install
Expand Down
2 changes: 1 addition & 1 deletion Sources/iPages/PageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct PageViewController: UIViewControllerRepresentable {
pageViewController.setViewControllers(
[controllers[currentPage]],
direction: currentPage > previousPage ? .forward : .reverse,
animated: animated)
animated: currentPage == previousPage ? false : animated)
}

class Coordinator: NSObject, UIPageViewControllerDataSource, UIPageViewControllerDelegate {
Expand Down

0 comments on commit f6e75b6

Please sign in to comment.