的applicationDidFinishLaunching
當我運行我的應用程序不會被調用。的applicationDidFinishLaunching不叫,用故事板和swift3
這是我AppDelegate
類的代碼:
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
let statusItem = NSStatusBar.system().statusItem(withLength: NSSquareStatusItemLength)
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
}
我使用斯威夫特3和故事板我的應用程序。
答案applicationDidFinishLaunching - not triggering建議對AppDelegate.swift
連接到應用程序對象的故事板。我沒有任何應用程序對象。
我的應用程序沒有主菜單,它是代理,因爲我試圖構建類似於聚光燈的東西。
我應該怎麼做才能applicationDidFinishLaunching
運行?
謝謝!我真的錯過了應用程序場景。 –