MUHorizontalPager
@IBDesignable
open class MUHorizontalPager : MUNibView
Class that act like UIScrollView + isPagingEnabled with more customizable options.
-
The object that acts as the delegate of the pager.
Declaration
Swift
@IBOutlet public weak var delegate: MUHorizontalPagerDelegate?
-
The pager can interact with a page control.
Declaration
Swift
@IBOutlet public weak var pageControl: MUPageControl? { get set }
-
Describes the margin around the scroll view (The part on the margin will be visible but not scrollable).
Declaration
Swift
@IBInspectable open dynamic var horizontalMargin: CGFloat { get set }
-
Lays out subviews.
Declaration
Swift
override open func layoutSubviews()
-
The natural size for the receiving view, considering only properties of the view itself.
Declaration
Swift
override open var intrinsicContentSize: CGSize { get }
-
Add all views to the pager with an optional margin between each pages.
Declaration
Swift
open func add(views: [UIView], margin: CGFloat = 0.0)
-
Define the current page index, animated or not.
Declaration
Swift
open func set(page: Int, animated: Bool = false)
-
Tells the delegate when the user scrolls the content view within the receiver.
Declaration
Swift
public func scrollViewDidScroll(_ scrollView: UIScrollView)
-
Tells the delegate when the user finishes scrolling the content.
Declaration
Swift
public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>)
-
Will trigger each time the page control is tapped.
Declaration
Swift
public func didTap(pageControl: MUPageControl, at index: Int)