question

PalmersjLudvig-7010 avatar image
0 Votes"
PalmersjLudvig-7010 asked RobCaplan edited

Xamarin.iOS UIAccessibility.PostNotification

I cant get UIAccessibility.PostNotification to work.
The following code should read up the text
UIAccessibility.PostNotification(UIAccessibilityPostNotification.Announcement, new NSString(@"Item was saved"));
It says nothing with VoiceOver on. Tried putting this code on ViewWillAppear and on some button click events but nothing works.


dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PalmersjLudvig-7010 Try the following code.

 var toRead = new NSAttributedString("Item was saved", NSDictionary.FromObjectAndKey(new NSNumber(0), UIView.SpeechAttributeQueueAnnouncement));
 UIAccessibility.PostNotification(UIAccessibilityPostNotification.Announcement, toRead);

Note that UIAccessibility.PostNotification applies to "Xamarin iOS SDK 12".

0 Votes 0 ·

0 Answers