Skip to content

Commit

Permalink
Adds 'visibleViewControllers'
Browse files Browse the repository at this point in the history
  • Loading branch information
shoheiyokoyama committed Nov 12, 2019
1 parent 2d7f399 commit 079f2a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Chausie/PageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public final class PageViewController: UIViewController {
return scrollView.panGestureRecognizer
}

/// The visible view controllers
public var visibleViewControllers: [Child] {
return Set([visibleIndices.backword, visibleIndices.backword]).map { viewControllers[$0] }
}

/// The view controllers displayed by the page view controller.
public let viewControllers: ContiguousArray<Child>

Expand Down

0 comments on commit 079f2a4

Please sign in to comment.