MrMins MrMins - 1 year ago 95
iOS Question

Fill programmatically UISegmentedControl using swift

Is possible fill the values of a

UISegmentedControl
programmatically using swift?

Answer Source
let segmentedControl = UISegmentedControl()
segmentedControl.insertSegment(withTitle: "Title", at: 0, animated: true)
segmentedControl.setTitle("Another Title", forSegmentAt: 0)