Awesome Open Source
Awesome Open Source


Custom SegmentedСontrol for ios on swift. Basic UISegmentedСontrol edit not weak and does not use the scroll, which will be added in this control

How use

Create cell:

let cell = SPSegmentedControlCell.init()
cell.label.text = "Avenir"
cell.imageView.image = UIImage.init(named: "imageName")
cell.layout = .textWithImage

Create SegmentedСontrol:

let segmentedСontrol = SPSegmentedControl.init()
segmentedСontrol.add(cell: cell)

and set frame, add as subview


SPSegmentedControlCellStyleDelegate use for update state cell when it happen (tap on cell or scroll optional). SPSegmentedControlDelegate you can use for detect position IndicatorView in SegmentedControl for cool animation and UI


You can use storyboard for create SegmentedСontrol. In SegmentedControl you can edit IndicatorView for customization selected view on SegmentedControl

In the project you will find my library Sparrow, it's what I use. But if needed, you can easily to remove it and do not use Sparrow in their projects


SPSegmentControl project is released under the MIT license. See for details.


[email protected]

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
swift (7,674
ui (1,016