I disabled "auto-enables menu items" for my app's main menu in Interface Builder because I need to disable some menus when certain views are lo开发者_如何学Caded. I am running into a problem though. Whenever my application communicates with another application (e.g. Safari) all the menus become disabled and I have to force-quit and restart the application. What could be causing this to happen?
Leave "Auto Enables Items" on and disable the items you need to disable on-demand via -validateUserInterfaceItem:
from the NSUserInterfaceValidations
protocol in your first responder (or designated target).
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/UIValidation/UIValidation.html#//apple_ref/doc/uid/10000040i
精彩评论