Mac 应用开发-- 在菜单栏中实现退出应用的功能

在AppDelegate中,对menu Item  拖线 实现退出应用的方法:

- (IBAction)windowShouldClose:(NSMenuItem *)sender {
    [NSApp terminate:self];
}

 如下图:

原文地址:https://www.cnblogs.com/741162830qq/p/5035447.html