Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow control to be deselected #10

Closed
simoami opened this issue May 25, 2016 · 6 comments
Closed

Allow control to be deselected #10

simoami opened this issue May 25, 2016 · 6 comments

Comments

@simoami
Copy link

simoami commented May 25, 2016

Hello,
I have a use-case to allow a new user to select his/her gender. I want the control to be initially deselected to prevent the user from skipping the setup screen with the default "Male" option. SO an empty option would help force the user to select an option. UISegmentedControl allows this:

control.selectedSegmentIndex = UISegmentedControlNoSegment

perhaps you could allow index and setIndex() to accept -1 as an exception. This is common standard for indexes.

@gmarm
Copy link
Owner

gmarm commented May 29, 2016

Hmm... that's interesting! It shouldn't be that big of a change but some logic needs to be changed since I'm using an UInt for the index and not an Int like UISegmentedControl does.

I'm adding this to the TODO list, thanks!

@gmarm gmarm closed this as completed May 29, 2016
@simoami
Copy link
Author

simoami commented Jun 1, 2016

thanks for the update. Can't wait to get it!

@pjebs
Copy link

pjebs commented Jun 26, 2016

Has this been implemented?

@gmarm
Copy link
Owner

gmarm commented Jun 26, 2016

@pjebs No, not yet. When I implement something I link the Pull Request it was implemented in.

@simoami
Copy link
Author

simoami commented Oct 26, 2016

@gmarm Any luck? The use case is not unusual.

@gmarm
Copy link
Owner

gmarm commented Oct 26, 2016

@simoami unfortunately not.

I understand the need for this and I see it's a popular request, however I haven't had much time for OSS lately.

Will do my best to work on it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants