Pergunta

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 loaded. 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?

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top