Change order of read items with VoiceOver

后端 未结 8 1187
醉话见心
醉话见心 2020-12-07 17:31

I have a bunch of buttons on the screen which are positioned intuitively visually but are not read in an intuitive order by VoiceOver. This is because certain buttons like U

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 18:03

    You can change the order setting the view's accessibilityElements array:

    self.view.accessibilityElements = @[self.view1, self.view2, self.view3, self.view4];
    

    or

    self.anotherView.accessibilityElements = @[self.label1, self.txtView1, self.label2, self.txtView2];
    

    If you need to set the interaction enabled programmatically:

    [self.view1 setUserInteractionEnabled:YES];
    

    If the view is hidden the voice over will not pass through it.

提交回复
热议问题