Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding Speech to custom UIMenuController
    primarykey
    data
    text
    <p>I created a custom <code>UIMenuController</code> in a <code>UIWebView</code> but it seems to get rid of the "Speak Selection" option in the <code>UIMenuController</code> after that. The speak selection option is turned on in Preferences on all test devices and it appears in other apps, including non-Apple apps. Is there an accessibility service or part of the <code>sharedMenuController</code> that I can call to get this item?</p> <pre><code>UIMenuItem *copyMenuItem = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"Copy", @"Copy menu item") action:@selector(myappCopy:)]; UIMenuItem *highlightMenuItem = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"Highlight", @"Highlight menu option") action:@selector(myappHighlight:)]; UIMenuItem *unhighlightMenuItem = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"Remove Highlight", @"Remove Highlight menu option") action:@selector(myappRemoveHighlight:)]; UIMenuItem *noteMenuItem = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"Note", @"Note menu options") action:@selector(myappNote:)]; [UIMenuController sharedMenuController].menuItems = [NSArray arrayWithObjects:copyMenuItem, highlightMenuItem, unhighlightMenuItem, noteMenuItem, nil]; [copyMenuItem release]; [highlightMenuItem release]; [unhighlightMenuItem release]; [noteMenuItem release]; </code></pre> <p>I even tried to parse the existing shared menu items at the start, but I don't see anything dumped in the log. The method is getting called on app launch.</p> <p>Tried this at top of method:</p> <pre><code> for (UIMenuItem *menuItem in [UIMenuController sharedMenuController].menuItems) { NSLog(@"title: %@", menuItem.title); NSLog(@"action: %@", menuItem.action); } </code></pre> <p>Any help is much appreciated! Thanks - Eric</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload