SPSegmentedControl

Custom segmented Control menu in Swift 3 for UI flat iOS designs

Screenshots

</a>

Features

Installation

The easiest way of installing SPSegmentedControl is from cloning SPSegmentedControl repository to your PC add SPCustomSegment.swift into your Xcode project file.

Usage

@IBAction func customSegmentValChnge(_ sender: CustomSegment) {
        switch sender.selectedSegmentIndex {
        case 0:
            print("SMS")
            break
        case 1:
            print("Interuption")
            break
        case 2:
             print("Disconnection")
            break
        default:
        }
    }

</a>

The demo project

demo project will be upload soon.

How to use

To start using SPSegmentedControl you have to add the class wherever you want to use: “SPCustomSegment.swift”

Create new View and Select custom class in -> Identity inspector to select SPCustomSegment under Custom Class.

Properties

The parameters you are able to modify are the following:

Border Width : Width of the border line around segments and control.
Border Color : Border line color around segments and control.
Text Color : Text color attributes for non selected state.
Selected Text Color :Text color for segment in selected state.
Selected Color : Background color for segment in selected state.

License

SPSegmentedControl is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

If this code was helpful, I would love to hear from you.

Twitter : @Pranavan
If you have any questions please post your comments on @BeTheDev