iOS VoiceOver 辅助功能 - 如何在操作完成后实现 "Action X performed"?

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

例如,在邮件应用中,通过 VoiceOver 删除项目后,您会听到 "Message deleted"。我如何为我的自定义实现它 action/button?

您可以使用UIAccessibilityPostNotification方法。

例如 Objective-C:

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

有关详细信息,请参阅: https://developer.apple.com/documentation/uikit/1615194-uiaccessibilitypostnotification