Re: Accessibility value in iOS switches
Re: Accessibility value in iOS switches
- Subject: Re: Accessibility value in iOS switches
- From: Chris Fleizach <email@hidden>
- Date: Sat, 26 Aug 2017 23:21:26 -0700
Hi
It looks like there’s no way to achieve this with a custom control.
Your best bet is to subclass a UISwitch at this point.
Please file an enhancement request though
https://developer.apple.com/bug-reporting/
<https://developer.apple.com/bug-reporting/>
Thanks!
> On Aug 26, 2017, at 11:13 AM, Ilya Konstantinov <email@hidden>
> wrote:
>
> Hi,
>
> I've implemented a switch (like UISwitch) on top of UIControl:
>
> class MyControl: UIControl {
> public var value: Bool = false
>
> override func accessibilityActivate() -> Bool {
> self.value = !self.value
> self.accessibilityValue = self.value ? "yes" : "no"
> return true
> }
> }
>
> UISwitch reads "Accessibility label, on" (and then hint: "Double tap to
> goggle") or "Accessibility, off". When toggling the switch, it simply
> announces the value "on" or "off" without the accessibility label prefix. In
> my control, however, it always reads the accessibility label first (e.g.
> "Accessibility label, yes"). How can I emulate the UISwitch behavior?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Accessibility-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden