Segmented Control

Screencast 2018-04-02 at 1.46.59 pm.gif

I've just released SegmentedControl; a small UI control for iOS.

 

Install

In your Cartfile:

github "reddavis/SegmentedControl"

 

Example

let segmentedControl = SegmentedControl() 
segmentedControl.tintColor = UIColor.blue 
segmentedControl.addButton(title: "Button A") 
segmentedControl.addButton(title: "Button B") 
segmentedControl.addButton(title: "Button C") 
segmentedControl.addTarget(self, action: #selector(self.segmentedControlValueDidChange(_:)), for: .valueChanged) 
self.view.addSubview(segmentedControl)