Minimalistic segmented view with buttons as single segment. Dot indicator used to show which segment currently selected.
DISegmentedView is simple in use. All configurations fully compatible with InterfaceBuilder. Or you can create this component from code:
let newSegmentedView = DISegmentedView(names: ["first", "second", "third"], frame: CGRect(x: 0, y: 0, width: 100, height: 44))
view.addSubview(newSegmentedView)And use it as usual UIControl:
newSegmentedView.addTarget(self, action: #selector(valueDidChanged(_:)), forControlEvents: .ValueChanged)Add pod 'DISegmentedView' to your Podfile.
Just copy DISegmentedView class to your project.
- Xcode 7.0
- iOS 8.0+
DISegmentedView is available under the MIT license. See the LICENSE file for more info.
