Skip to content

tapptitude/TTSnailPageControl

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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