Mac 应用开发-- 在菜单栏中实现退出应用的功能 在AppDelegate中,对menu Item 拖线 实现退出应用的方法: - (IBAction)windowShouldClose:(NSMenuItem *)sender { [NSApp terminate:self]; } 如下图: