I'm currently writing a Mac App in Objective-C and can't for the life of me figure out how to hide a NSMenuItem. (Note: Yes I really mean hide, not disable/grey-out. I realize the UX implications of doing so, but the functionality isn't really what you think it is. Just trust me on this.)
The documentation doesn't mention anyway to do so, is it even possible?
If you have defined your NSMenuItem
in your header and connected it through your NIB, you can simply call the Hidden property.
[myMenuItem setHidden:YES];
"Greying out" the menuItem would be [myMenuItem setEnabled: NO];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With