Skip to content

Commit

Permalink
Make sure to always set the rootViewController's dataSource in PageCo…
Browse files Browse the repository at this point in the history
…ordinator
  • Loading branch information
pauljohanneskraft committed Oct 19, 2019
1 parent 37aa3d0 commit f89ffac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/XCoordinator/PageCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ open class PageCoordinator<RouteType: Route>: BaseCoordinator<RouteType, PageTra
set: Presentable? = nil,
direction: UIPageViewController.NavigationDirection = .forward) {
self.dataSource = PageCoordinatorDataSource(pages: pages.map { $0.viewController }, loop: loop)
rootViewController.dataSource = dataSource

guard let firstPage = set ?? pages.first else {
assertionFailure("Please provide a positive number of pages for use in \(String(describing: PageCoordinator<RouteType>.self))")
Expand Down

0 comments on commit f89ffac

Please sign in to comment.