Re: Accessibility value in iOS switches
Re: Accessibility value in iOS switches
- Subject: Re: Accessibility value in iOS switches
- From: Ilya Konstantinov <email@hidden>
- Date: Sun, 27 Aug 2017 16:43:09 +0000
Filed as rdar://34101903.
On Sat, Aug 26, 2017 at 11:21 PM Chris Fleizach <email@hidden> wrote:
> 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/
>
> 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