在XCode中创建一个新的Cocoa项目会给我一个AppDelegate.swift文件,如下所示:importCocoa@NSApplicationMainclassAppDelegate:NSObject,NSApplicationDelegate{@IBOutletweakvarwindow:NSWindow!}The@NSApplicationMainattributeisdocumentedhere作为NSApplicationMainApplythisattributetoaclasstoindicatethatitistheapplicationdelegate.Usin