Lets say my UISegmentedControl has 8 numbered segments. I would like for the user to be able to turn on 2, 3, or more of them at once. Toggling them. Essentially like a bits
Answer for those who will come here from Google: it's now possible to change the behaviour of a UISegmentedControl. Go to Inspector -> Mode -> Select Any instead of Select One. To find out which segments are selected I suggest to create a function like this one:
extension UISegmentedControl {
func getBarState() -> [Bool] {
var states: [Bool] = []
for i in 0..
As Google brought me here while searching for the OSX version I'll also post a working solution for NSSegmentedControl:
extension NSSegmentedControl {
func getBarState() -> [Bool] {
var states: [Bool] = []
for i in 0..