Just another cool animated and fully customizable page control.
- iOS 11.0+
- Xcode 11.0+
Xcode
> File
> Swift Packages
> Add Package Dependency...
> Paste
https://github.com/tapptitude/TTSnailPageControl
Add the contents of Sources/TTSnailPageControl folder to your project.
-
Create a
TTSnailPageControl
instance either from code or using the interface builder. -
Set the
scrollView
property
pageControl.scrollView = scrollView
- Customize the control
pageControl.configuration.itemsCount = 4
pageControl.configuration.itemSize = CGSize(width: 20, height: 10)
pageControl.configuration.spacing = 10.0
pageControl.configuration.layerConfiguration { (layer, index) in
layer.backgroundColor = UIColor(named: "Unselected")?.cgColor
layer.cornerRadius = 5
}
pageControl.configuration.selectionLayerConfiguration { (layer) in
layer.backgroundColor = UIColor(named: "Selected")?.cgColor
layer.cornerRadius = 5
}
Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!
TTSnailPageControl is available under the MIT license. See the LICENSE file for more info.