Skip to content

About

A paging view.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

STPageView

Language Platform Version License

A paging view.

STPageView is a paging view. You can use it to layout multiple view controllers, switching through gestures. And it supports both horizontal and vertical directions.

STPageViewPreview01

STPageViewPreview02

Requirements

  • iOS 8.0 or later (For iOS 8.0 before, maybe it can work, but I have not tested.)
  • ARC
  • Swift 5.0

Installation

STPageView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'STPageView'

Usage

Import headers in your source files

In the source files where you need to use the library, import the header file:

import STPageView

Initialize STPageView

Use the following function to initialize the STAlertController, then add it to your view and set up the Auto Layout:

let pageView = STPageView(controllers: [controllerA, controllerB])

Implement STPageViewDelegate

Implement STPageViewDelegate, you can using some STPageView delegate functions:

func pageView(_ pageView: STPageView, didSelect controller: UIViewController) {
    print("PageView didSelect \(controller), index \(pageView.controllers.index(of: controller)!)")
}

Author

Suta, shien7654321@163.com

License

MIT license.

About

A paging view.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages