APFancyPagerViewController
open class APFancyPagerViewController : UIViewController, UIScrollViewDelegate
Our almighty class which is simply a UIViewController. Everything starts by using this view controller.
-
Delegate variable, you don’t have to set this.
Declaration
Swift
open weak var delegate: APFancyPagerDelegate? -
Datasource variable, you have to set this.
Declaration
Swift
open weak var dataSource: APFancyPagerDataSource? -
Some initialization codes.
Declaration
Swift
public required init?(coder aDecoder: NSCoder) -
Still some initialization codes.
Declaration
Swift
public init() -
The viewDidLoad function that we also override from UIViewController. But you already know that.
Declaration
Swift
open override func viewDidLoad() -
Use this function in order to reload the APFancyPager.
Declaration
Swift
open func reloadData() -
You can use this function in order to scroll to the specific index of the APFancyPager.
Declaration
Swift
open func scrollToPage(_ pageNumber: Int, animated: Bool)Parameters
pageNumberPage number that you want to scroll to. Friendly reminder: Sure, you already know that but anyways, this number starts with the 0(zero).
animatedShould this scrolling be animated or not?
-
We use this function to get scroll movements of our scrollview.
Declaration
Swift
open func scrollViewDidScroll(_ scrollView: UIScrollView)Parameters
scrollViewUIScrollView that is currently being used.
-
We use this function also to get scroll movements of our scrollview.
Declaration
Swift
open func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView)Parameters
scrollViewUIScrollView that is currently being used.
-
We use this function also to get scroll movements of our scrollview.
Declaration
Swift
open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)Parameters
scrollViewUIScrollView that is currently being used.
APFancyPagerViewController Class Reference