APFancyPagerDataSource
@objc
public protocol APFancyPagerDataSource : AnyObject
Data source protocol for APFancyPager
-
You should implement this function in order to tell the number of your view controllers that will be used in the APFancyPager.
Declaration
Swift
func numberOfViewControllers(_ fancyPagerViewController: APFancyPagerViewController) -> Int
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
Return Value
Number of view controllers that will be used in the APFancyPager
-
You should implement this function in order to tell the view controllers that will be used in the APFancyPager.
Declaration
Swift
func fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, viewControllerForIndex index: Int) -> UIViewController
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
viewControllerForIndex
Index parameter of the view controller that will be used in the APFancyPager.
Return Value
View controller that will be used in the APFancyPager
-
You should implement this function in order to tell the header height of the APFancyPager.
Declaration
Swift
func heightForHeader(_ fancyPagerViewController: APFancyPagerViewController) -> CGFloat
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
Return Value
Header height of the APFancyPager
-
You should implement this function in order to tell the header string at the given index of the APFancyPager.
Declaration
Swift
func fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerStringForIndex index: Int) -> String
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
headerStringForIndex
Index parameter of the header that used in the APFancyPager.
Return Value
Header string of the given index of the APFancyPager
-
You should implement this function in order to tell the header background color at the given index of the APFancyPager.
Declaration
Swift
func fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerBackgroundColorForIndex index: Int) -> UIColor
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
headerBackgroundColorForIndex
Index parameter of the header that used in the APFancyPager.
Return Value
Header background color of the given index of the APFancyPager
-
You should implement this function in order to tell the header text color at the given index of the APFancyPager.
Declaration
Swift
func fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerTextColorForIndex index: Int) -> UIColor
Parameters
fancyPagerViewController
APFancyPagerViewController object of currently using.
headerTextColorForIndex
Index parameter of the header that used in the APFancyPager.
Return Value
Header text color of the given index of the APFancyPager