Moving Accessibility Voiceover cursor focus to a specific element

后端 未结 3 2002
时光取名叫无心
时光取名叫无心 2021-02-14 10:45

I\'m having an issue with moving the voiceover cursor to a specific element on viewDidAppear. I followed Apple\'s guidelines for focusing on a specific element, in this case a d

3条回答
  •  时光说笑
    2021-02-14 11:03

    This answer may be of help.

    Basically you need to wrap your elements in a container view if they're not in one already and then override the methods specified.

    By giving your desired element a tag that is lower than the other elements you can have the view sort the array to ensure that it will be the first element in the accessibilityElements array used by VoiceOver. Or you can adapt the sort method to sort another way.

提交回复
热议问题