Multiple choice with UISegmentedControl - what uses pages?

I want to make the Bold / Underline / Italic panel, as you see on the pages (iPhone / iPad). They use what the UISegmentedControl seems to be.

But they can simultaneously display both the selected / selected line and incompatible with the current UISegmentedControl. The closest I can find is "instant", which makes UISegmentedControl like a button array.

NSSegmentedControl (Mac version) seems to have this ability by setting [cell setTrackingMode: NSSegmentSwitchTrackingSelectAny]. It also has an NSSegmentSwitchTrackingMomentary, similar to UISegmentedControl (which uses BOOL).

Is there a way to subclass UISegmentedControl to add this ability? Are there any good third party tools for toolbars that do this? What do Apple pages do?

+8
ios objective-c uisegmentedcontrol
source share
2 answers

I do not think you can do this with a UISegmentedControl . You can create them as separate UIButtons and do whatever you want. In the end, you use behavior like UIButton s, so it shouldn't be harder.

+1
source share

You should look here: https://github.com/yonat/MultiSelectSegmentedControl - this works.

+1
source share

All Articles