FUIPageViewController
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
open var style: Style { get set }
-
FUIPageViewController
will set the title of the navigation bar with two lines of texts. This property points to theFUIText
of 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) -> Int
The format of the title string could be customized using
pageIndexFormat
property.Developer can use this property to customize the properties of the text.
Declaration
Swift
open var titleText: FUIText { get }
-
FUIPageViewController
will set the title of the navigation bar with two lines of texts. This property points to theFUIText
of the second line.The second line is the individual title of the page. This subtitle is coming from the following optional function from the
dataSource
which implements FUIPageViewControllerDataSource.@objc optional func presentationTitle(for pageViewController: FUIPageViewController) -> String?
Developer can use this property to customize the properties of the text.
Declaration
Swift
open var subtitle: FUIText { get }
-
The toolbar button that will navigate to the next controller when tapped.
Declaration
Swift
public let nextButtonItem: FUIBarButtonItem
-
The toolbar button that will navigate to the previous controller when tapped.
Declaration
Swift
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
presentationIndex
API of theUIPageViewControllerDataSource
. - The second parameter is using the total page number obtained from the
presentationCount
API of theUIPageViewControllerDataSource
.
Declaration
Swift
public var pageIndexFormat: String?
- The first parameter is using the current page number obtained from the
-
An implementation of
UIPageViewControllerDataSource
.Developers may provide a
FUIPageViewControllerDataSource
implementation which implements the optionalpresentationTitle
function to set the subtitle of theTitleView
for each page to be displayed.Or, developers just provide a standardard
UIPageViewControllerDataSource
here. In this case, the subtitle of theTitleView
is empty.Declaration
Swift
open override var dataSource: UIPageViewControllerDataSource? { get set }