Created
September 16, 2012 08:12
-
-
Save cppforlife/3731529 to your computer and use it in GitHub Desktop.
menu items for NSApp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)_listMenuItems { | |
NSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu]; | |
for (NSMenuItem *item in [mainMenu itemArray]) { | |
NSLog(@"Menu %@:", [item title]); | |
for (NSMenuItem *subitem in [item.submenu itemArray]) { | |
NSLog(@"\t%@\n\t\t%@ - %@ - %@\n", | |
[subitem title], | |
NSStringFromSelector([subitem action]), | |
subitem.target, | |
subitem.representedObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment