SCPageControl 0.4.0

SCPageControl 0.4.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2019
SPMSupports SPM

Maintained by myoungsc.



  • By
  • myoung

SCPageControl

CI Status Version License Platform

Description

Scrolling A page control that moves in sync with the page movement distance.

Next Update Todo

  • Apply disable_color another design.

ScreenShot

Requirements

* Swift 5.0
* XCode 10.2 (10E125)
* iOS 9.0 (Min SDK)
* Not Use Autolayout

Installation

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

//Swift 5.0
pod "SCPageControl"

//Swift 4.2
pod "SCPageControl", '-> 0.3.2'

//Swift 4.0
pod "SCPageControl", '-> 0.2.1'


//After
pod install

How To Use

import SCPageControl

public enum SCPageStyle: Int {
    case SCNormal = 100
    case SCJAMoveCircle // Design by Jardson Almeida
    case SCJAFillCircle // Design by Jardson Almeida
    case SCJAFlatBar // Design by Jardson Almeida
}

let sc = SCPageControlView()

override func viewDidLoad() {
    super.viewDidLoad()

	sc.frame = CGRect(x: 0, y: UIScreen.main.bounds.size.height-50, width: UIScreen.main.bounds.size.width, height: 50)
	sc.scp_style = .SCNormal
	sc.set_view(5, current: 0, current_color: .red, disable_color: nil)
    /**
     disable_color is dot background color that current not focus
	 */
    //ScPageControl.set_view(5, current: 0, current_color: .red, disable_color: .gray)
	view.addSubview(sc)
}

//MARK: ScrollView Delegate
func scrollViewDidScroll(_ scrollView: UIScrollView) {
	sc.scroll_did(scrollView)
}

Author

myoung

HomePage

[email protected]

Design And Help

SCJA series Design is "Jardson Almeida", e-mail is "[email protected]"
Algorithm Help
Jangbyeonghui to PeopleRoad

License

SCPageControl is available under the MIT license. See the LICENSE file for more info.