nambatee
nambatee

Reputation: 1568

iOS VoiceOver accessibility - how to implement "Action X performed" after action is complete?

For example, in the Mail app, after you delete an item via VoiceOver, you hear "Message deleted". How can I implement that for my custom action/button?

Upvotes: 1

Views: 698

Answers (1)

bubu
bubu

Reputation: 353

You can use the UIAccessibilityPostNotification method.

For example in Objective-C:

UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"String to be read");

For more information see: https://developer.apple.com/documentation/uikit/1615194-uiaccessibilitypostnotification

Upvotes: 4

Related Questions