0

it looks like UISegmentedControl doesn't allow user to do multiple selection by default.

I have seen some github libraries for obj-c, how allow multiple segment selection using swift?

enter image description here

how to do multiple selection in segmented control in swift ?

DeyaEldeen
  • 10,847
  • 10
  • 42
  • 75
  • 1
    You don't need a new library written in Swift. Any existing library written in Objective-C can be linked against your project, and all of its functionality is accessible from within Swift — no Objective-C need be written by you. See [here](http://stackoverflow.com/questions/24002369/how-to-call-objective-c-code-from-swift) for an example. – Jack Greenhill Jul 26 '16 at 13:34
  • You could try implementing a collection view with three cells and multiple selection – markedwardmurray Jul 27 '16 at 03:55
  • Possible duplicate of [Multiple selection of segments in UISegmentedControl](https://stackoverflow.com/questions/35215378/multiple-selection-of-segments-in-uisegmentedcontrol) – Ahmad F Jul 20 '17 at 06:52

1 Answers1

1

UIKit does not provide any feature to support for multiple selections in UISegmentControl. Recommendation would be to create a custom control, better to use an array of UISwitch controls where it represents each of the options in your UISegmentControl.

Santosh
  • 2,900
  • 1
  • 16
  • 16