FUIPageViewController
@MainActor
open class FUIPageViewController : UIPageViewController
extension FUIPageViewController: UIPageViewControllerDelegate
extension FUIPageViewController: UIPageViewControllerDataSource
This controller is based on the standard UIPageViewController to navigate between sibling controllers.
There are ‘Previous’ and ‘Next’ buttons in the bottom tool bar to help user navigation. This is in addition to the user swipe gestures handled in the
UIPageViewController.The title of the navigation controller consists of a page index title and a page subtitle. Please refer to
FUIPageViewController.TitleView.
Theming
Supported TEXT class paths:
fdlFUIPageViewController_title {}
fdlFUIPageViewController_subtitle {}
Supported TEXT properties:
font-color: (Color)
font-style: (UIFontTextStyle)
Supported BarButtonItem class paths:
fdlFUIPageViewController_nextButtonItem
fdlFUIPageViewController_previousButtonItem
Supported UIBarButtonItem properties:
font-color { -disabled } (Color)
font-style: { -disabled } (UIFontTextStyle)
image { -disabled } (Image)
-
The styles for the
See moreFUIFUIPageViewController.Declaration
Swift
public enum Style -
The style for this
FUIPageViewController.The default is
.textBased. Which means the “Previous” and “Next” button titles are in ‘text’ format. Developer may set the style to ‘.iconBased’ that the buttons will be in icons.Declaration
Swift
@MainActor open var style: Style { get set } -
FUIPageViewControllerwill set the title of the navigation bar with two lines of texts. This property points to theFUITextof the first line.The text of the first line is consists of the index of the page and the total number of pages, such as “1 of 20”. The values are from the following optional functions from the
dataSource.optional public func presentationCount(for pageViewController: UIPageViewController) -> Int optional public func presentationIndex(for pageViewController: UIPageViewController) -> IntThe format of the title string could be customized using
pageIndexFormatproperty.Developer can use this property to customize the properties of the text.
Declaration
Swift
@MainActor open var titleText: FUIText { get } -
FUIPageViewControllerwill set the title of the navigation bar with two lines of texts. This property points to theFUITextof the second line.The second line is the individual title of the page. This subtitle is coming from the following optional function from the
dataSourcewhich implements FUIPageViewControllerDataSource.@objc optional func presentationTitle(for pageViewController: FUIPageViewController) -> String?Developer can use this property to customize the properties of the text.
Declaration
Swift
@MainActor open var subtitle: FUIText { get } -
The toolbar button that will navigate to the next controller when tapped.
Declaration
Swift
@MainActor public let nextButtonItem: FUIBarButtonItem -
The toolbar button that will navigate to the previous controller when tapped.
Declaration
Swift
@MainActor public let previousButtonItem: FUIBarButtonItem -
The format of the page index text.
The default is localized ‘%d of %d’.
- The first parameter is using the current page number obtained from the
presentationIndexAPI of theUIPageViewControllerDataSource. - The second parameter is using the total page number obtained from the
presentationCountAPI of theUIPageViewControllerDataSource.
Declaration
Swift
@MainActor public var pageIndexFormat: String? - The first parameter is using the current page number obtained from the
-
An implementation of
UIPageViewControllerDataSource.Developers may provide a
FUIPageViewControllerDataSourceimplementation which implements the optionalpresentationTitlefunction to set the subtitle of theTitleViewfor each page to be displayed.Or, developers just provide a standardard
UIPageViewControllerDataSourcehere. In this case, the subtitle of theTitleViewis empty.Declaration
Swift
@MainActor open override var dataSource: UIPageViewControllerDataSource? { get set }