Voice over doesn't read phone number properly

后端 未结 5 1176
半阙折子戏
半阙折子戏 2020-12-17 03:36

I have phone number in below format

1-1xx-2xx-9565

Currently VO read it as \"One (pause) One x x

5条回答
  •  天涯浪人
    2020-12-17 03:58

    As of iOS 13 you can use a - NSAttributedString.Key.accessibilitySpeechSpellOut as a accessibilityAttributedLabel to make VoiceOver read each letter of the provided string (or a range of string).

    So for example:

    yourView.accessibilityAttributedLabel = NSAttributedString(string: yourText, attributes: [.accessibilitySpeechSpellOut: true])
    

提交回复
热议问题