简体   繁体   中英

VoiceOver pronunciation of numbers as years

Let's say I have a label that contains “1877”. The way I have it now is that VoiceOver tells me the contents of the label is “one thousand eight hundred seventy seven”. What I'd like it to say is “Eighteen hundred seventy seven”.

Is there a way to let VoiceOver know that a certain number in a UILabel is supposed to be pronounced as a year?

D'oh. Figured it out by simply putting the word year in front of it.

My previous thinking was to set accessibilityLabel to a description of what the label shows and accessibilityValue with just the number.

In my example it was

accessibilityLabel = @"Minimum year"
accessibilityValue = @"1877"

Now I changed it to

accessibilityLabel = @"Minimum"
accessibilityValue = @"Year 1877"

which, I think, makes it easier to comprehend.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM