DVSwitch icon indicating copy to clipboard operation
DVSwitch copied to clipboard

Doesn't expose selectedIndex property

Open itsthejb opened this issue 9 years ago • 5 comments

Hi there,

This looks pretty nice for a custom control. However, it doesn't appear to be possible to query the current state of the control since the selectedIndex property is private... I would imagine this would be required by a lot of users.

Pardon me if I'm missing something in the API, but have doesn't seem so to me. In any case, keep up the good work.

itsthejb avatar Feb 26 '15 10:02 itsthejb

Well the intent is that you always control what happens in the pressedHandler block and don't ever need to check the control outside. But I can see when this might be useful.

Voley avatar Feb 26 '15 10:02 Voley

I second this. Maybe not all the logic code can be put in the pressedBlock. Try to think over this scenario. Also, we may need title of the selected segment.

yam-liu avatar Jul 15 '15 08:07 yam-liu

@ooopscc @itsthejb this property will be made public in next release.

Voley avatar Jul 15 '15 10:07 Voley

:+1:

itsthejb avatar Jul 15 '15 10:07 itsthejb

:+1: What about the title of the selected segment like UISegmentedControl does?

yam-liu avatar Jul 15 '15 10:07 yam-liu