Re: UIStackView and shouldGroupAccessibilityChildren
Re: UIStackView and shouldGroupAccessibilityChildren
- Subject: Re: UIStackView and shouldGroupAccessibilityChildren
- From: email@hidden
- Date: Mon, 24 Jul 2017 11:57:16 -0700
> On Jul 24, 2017, at 11:20 AM, David Dunham <email@hidden> wrote:
>
> Normally my iOS app is able to use shouldGroupAccessibilityChildren to get
> items navigated in the best order (rather than the top-down, left-to-right
> which seems to be the default).
>
> I’ve got a UILabel and a UITextField that I want navigated in that order. I’m
> putting them in a UIStackView for layout purposes:
>
> UIStackView* nameContainer = [[UIStackView alloc]
> initWithArrangedSubviews: @[caption, clanName]];
> nameContainer.alignment = UIStackViewAlignmentFirstBaseline;
> nameContainer.spacing = 4;
> [self.scrollContents addArrangedSubview: nameContainer];
> nameContainer.shouldGroupAccessibilityChildren = YES;
>
> When I swipe, VoiceOver goes first to the UITextField (since it’s taller),
> and then the UILabel. How can I change this?
nameContainer.accessibilityElements = @[ label, textField ]
>
> David Dunham
> Twitter: @radiofreelunch http://www.pensee.com/dunham/
>
> _______________________________________________
> 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