How can I enable multiple segments of a UISegmentedControl to be selected?

后端 未结 6 1573
太阳男子
太阳男子 2021-01-04 06:44

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

6条回答
  •  孤城傲影
    2021-01-04 07:08

    There appears to be a way to do this in XCode now. In the Attributes Inspector, there is a section with Segment, Title, Image, Behavior. The behavior options are "Enabled" and "Selected". You can selecte "Selected" for multiple segments.

提交回复
热议问题