Ther best I found to learn was to get some Apple sample code for MacApp and (painfully) understand how it worked.
And then, start buiding an app.
Do you plan to use storyboard or only xib (I do not use storyboards for MacOS app, only for iOS, because I wanted more flexibility on managing windows).
Where do you stand in your set up ?
What I usually have
- a mainMenu.xib (in which I define the splash screen)
- an AppDelegate, with all the app initialization func (as appDidFinishLaunching) and the IBOutlets for the splash screen
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
- in this AppDelegate, an appController IBOutlet that is also added to the mainMenu.xib, in order to be able to call appDelegate.appController when needed
@IBOutlet weak var appController: AppController!
Note: the links between AppDelegate and AppController may be tricky some times.
- an AppController class where all IBOutlets for the menuBar items and their IBActions are defined
- The menuItems in MainMenu.xib are connected to those IBOutlets and IBActions
- I define all the windows references in a Global class (a singleton).
- And create a xib for each class of window.
Hope that helps. Tell where you have problem.