Skip to content

fred76/FR76SegmentedControl

Repository files navigation

FR76SegmentedCoctrol

Screenshot

alt tag

Requirements

Xcode V. 8.1

iOS 10.1
Swift 3

Installation

Just add the "MySegment" file to your project.

Usage

FR76SegmentedCoctrol is subclass of UIControl as replacement of UISgmentedControl. create a UIview and assign "MySegment" class

  override func viewDidLoad() {
    super.viewDidLoad()
    // add image
    seg.imageToAdd = ["Aerosol", "Generic", "Injection", "Drop"]
    // choose color
    seg.colorArray = [.red ,.blue, .orange,.green]
    // label title
    seg.labelText = ["Aerosol", "Generic", "Injection", "Drop"]
    // setUp the view
    seg.setupView()}

Setup: Image position, selected/unselected label text color and label size as @IBInspectable value

alt tag

About

iOS SegmentedControl Subclass

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages