我使用Xcode 6和Swift语言创建了一个示例项目。
Xcode创建了AppDelegate.swift,并附带以下代码
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(aNotification: NSNotification) {
// Insert code here to initialize your application
}
func applicationWillTerminate(aNotification: NSNotification) {
// Insert code here to tear down your application
}
}
@NSApplicationMain 是什么意思?我的 main.mm/main.m 文件中的 main() 函数在哪里?