2 segment controls on one page

I need to have 2 segment controls displayed at the same time (top and bottom of the screen). All works fine but only want one of them to have a default on state but can’t seem to find a way to have all segments switched off.

Dave

Hi Dave,

Segmented controls were designed to have one segment “on”, so you’ll need to find another approach to this. Perhaps you can set up a row of switches and write a simple function that turns the others off when one is clicked on.

Best regards,

Brent

Thats a shame, I need 8 segments but can only fit 4 across and thought I would split them into 2 sets.

Might just use buttons instead, segments was just a nice way of doing it.

Dave

Using the design patterns of native widgets, segmented controllers always have one active segment.  Do you have an example of a native app that’s doing what you are trying to do?  We build these widgets to try and mimic the native ones, but there are always odd use cases that we’ve not encountered.

Rob

There is a way to achieve a similar look and result. You can use the switch widget in radioButton configuration. Use 8 of them and line then up as you like. You can skin the switch using the imageSheet approach and provide each switch with the graphical depiction of what your segmented control segment would look like with the graphic + text in it. Hope this helps.

Cheers ksan will look at that.

Rob no I haven’t seen a native app doing it, it was just a question and was hoping it could be done as coding a segment is easier than 8 buttons.

But no problem, I wasn’t complaining or anything just asking.

Dave

Oh, don’t take my query wrong Dave.  I didn’t take it as complaining, but more to help my knowledge.

Hi Dave,

Segmented controls were designed to have one segment “on”, so you’ll need to find another approach to this. Perhaps you can set up a row of switches and write a simple function that turns the others off when one is clicked on.

Best regards,

Brent

Thats a shame, I need 8 segments but can only fit 4 across and thought I would split them into 2 sets.

Might just use buttons instead, segments was just a nice way of doing it.

Dave

Using the design patterns of native widgets, segmented controllers always have one active segment.  Do you have an example of a native app that’s doing what you are trying to do?  We build these widgets to try and mimic the native ones, but there are always odd use cases that we’ve not encountered.

Rob

There is a way to achieve a similar look and result. You can use the switch widget in radioButton configuration. Use 8 of them and line then up as you like. You can skin the switch using the imageSheet approach and provide each switch with the graphical depiction of what your segmented control segment would look like with the graphic + text in it. Hope this helps.

Cheers ksan will look at that.

Rob no I haven’t seen a native app doing it, it was just a question and was hoping it could be done as coding a segment is easier than 8 buttons.

But no problem, I wasn’t complaining or anything just asking.

Dave

Oh, don’t take my query wrong Dave.  I didn’t take it as complaining, but more to help my knowledge.