- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[[NSWorkspace sharedWorkspace] hideOtherApplications];// Insert code here to initialize your application
}
那会隐藏其他应用程序。我们该怎么做才能隐藏自己的主窗口?
答案 0 :(得分:6)
在Mac OS X 10.6及更高版本中:
[[NSRunningApplication currentApplication] hide];
答案 1 :(得分:0)
Swift 4
yearsIDList