Skip to content

tapptitude/TTSnailPageControl

Repository files navigation

TTSnailPageControl

SPM compatible License: MIT Twitter

About

Just another cool animated and fully customizable page control.

Requirements

  • iOS 11.0+
  • Xcode 11.0+

Installation

Swift Package Manager

Xcode > File > Swift Packages > Add Package Dependency... > Paste https://github.com/tapptitude/TTSnailPageControl

Manually

Add the contents of Sources/TTSnailPageControl folder to your project.

Usage

  1. Create a TTSnailPageControl instance either from code or using the interface builder.

  2. Set the scrollView property

pageControl.scrollView = scrollView
  1. 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
}

Contribution

Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages