Unfortunately, I haven't found anything useful on the Internet - I wanted to know, what code I actually have to type for initializing an application without using storyboard or XIB files in Swift. I know I have to have a .swift
file called main
. But I don't know what to write in there (like do I need autoreleasepool or something like that?). For example, what would I do for initializing an NSMenu
and how would I add a NSViewController
to the active window (iOS's similar .rootViewController
doesn't help). Thanks for any help ;)
Edit:
I actually don't want to use @NSApplicationMain
in front of the AppDelegate
. I'd rather know what exactly happens there and then do it myself.