PageView

public class PageView : UIScrollView
extension PageView: UIScrollViewDelegate

PageView is a customized page view.

Author

Adamas

Version

1.5.0

Date

07/08/2019
  • The delegate

    Declaration

    Swift

    public weak var pageViewDelegate: PageViewDelegate?
  • Whether the paging point should be shown or not.

    Declaration

    Swift

    public var shouldShowPageControl: Bool { get set }
  • The index of the current page.

    Declaration

    Swift

    public var currentPageIndex: Int { get set }
  • The number of pages in the controller.

    Declaration

    Swift

    public var numberOfPages: Int { get }
  • The current page presented.

    Declaration

    Swift

    public var currentPage: UIView? { get }
  • The buttom bargin of the page control.

    Declaration

    Swift

    public var pageControlButtomMargin: CGFloat { get set }
  • Add a new view.

    Declaration

    Swift

    public func add(_ view: UIView)

    Parameters

    view

    The view to be added.

  • Replace a view.

    Declaration

    Swift

    public func replace(_ view: UIView, atIndex index: Int)

    Parameters

    view

    The view to be replaced.

    index

    The index of the replaced view.

  • Remove a view.

    Declaration

    Swift

    public func removeView(atIndex index: Int)

    Parameters

    index

    The index of the view to be removed.

  • Remove all sub views.

    Declaration

    Swift

    public func removeAllViews()
  • Switch to next page.

    Declaration

    Swift

    @objc
    public func switchToNextPage()
  • Switch to previous page.

    Declaration

    Swift

    @objc
    public func switchToPreviousPage()
  • Switch to a specific news page.

    Declaration

    Swift

    public func switchToPage(withIndex index: Int,
                             withAnimation shouldAnimate: Bool = true)

    Parameters

    index

    The page index of the news.

    shouldAnimate

    Whether the animation should be allowed or not.

  • Undocumented

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    public override func draw(_ rect: CGRect)
  • Undocumented

    Declaration

    Swift

    public override func didMoveToSuperview()
  • Undocumented

    Declaration

    Swift

    public override func removeFromSuperview()
  • Undocumented

    Declaration

    Swift

    public func scrollViewDidScroll(_ scrollView: UIScrollView)