您好,欢迎来到华拓科技网。
搜索
您的当前位置:首页cocoa 点击关闭按钮退出应用程序

cocoa 点击关闭按钮退出应用程序

来源:华拓科技网

  

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    // Insert code here to initialize your application
    
    WebViewRadio *themWeb = [[WebViewRadio alloc]init];
    [themWeb frameSkinTheme:_window];
    [_window setDelegate:self];
    
    [[_window standardWindowButton:NSWindowZoomButton] setHidden:YES];
    //[[_window standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES];
    
    
    //[_window standardWindowButton:NSWindowCloseButton]
    //[NSApp hide:_window];
    //[NSApp endSheet:_window];
}
-(BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag{
    NSLog(@"%hhd",flag);
    [_window makeKeyAndOrderFront:nil];
    return YES;
}

-(void)windowWillClose:(NSNotification *)notification{
    //[NSApp terminate:self];
    [NSApp hide:_window];
}

转载于:https://my.oschina.net/kacper/blog/177728

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo6.cn 版权所有 赣ICP备2024042791号-9

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务