Automatic Addition of Menu Items in Cocoa Framework.

Discussion in 'Mac Programming' started by Senor Cuete, Nov 1, 2014.

  1. Senor Cuete macrumors regular

    Nov 9, 2011
    The Cocoa Framework automatically adds items that I don't want to my app's menus. For example it adds a character palette. I get rid of this by using this code in my AppController:
    + (void) initialize //override NSObject initialize so I can initialize the user defaults
        NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
        //Get rid of Special characters menu item in edit menu:
        [defaultValues setObject: [NSNumber numberWithBool: YES] forKey:@"NSDisabledCharacterPaletteMenuItem"];
        [[NSUserDefaults standardUserDefaults] registerDefaults: defaultValues];
    Is there some similar way to get rid of the "Start Dictation..." item that XCode 6.1 adds to the Edit menu? I can't find anything about this in XCode Help.
  2. briloronmacrumo macrumors 6502


    Jan 25, 2008
    Google "Cocoa Objective-C how to remove "start dictation" menu item"
    check out the stackoverflow post from 2014.
  3. Senor Cuete thread starter macrumors regular

    Nov 9, 2011
    Thanks. There is also a thread about this on the Apple Developer Forums, which gives another way to do this.

Share This Page