Scrolling A page control that moves in sync with the page movement distance.
-
Apply disable_color another design.disable_color is not beautiful
* Swift 5.0
* XCode 10.2 (10E125)
* iOS 9.0 (Min SDK)
* Not Use Autolayout
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
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)
view.addSubview(sc)
}
//MARK: ScrollView Delegate
func scrollViewDidScroll(_ scrollView: UIScrollView) {
sc.scroll_did(scrollView)
}
myoung
SCJA series Design is "Jardson Almeida", e-mail is "hello@jardsonalmeida.com"
Algorithm Help
Jangbyeonghui to PeopleRoad
SCPageControl is available under the MIT license. See the LICENSE file for more info.