I am going to make an OS X application with several views and windows.
It has several screens - splash, login/register and the main screen(and so on).
I tried to use NSWindowControllers. However, it's so complex to use and I'm confused.
What is the best experience in the view/window transitions?
How would you like to transition? It's probably unnecessary to transition between windows in your case. Better you make a NSViewController and transition between the subviews of the window. You should check out the basics of Cocoa.
You can then use the animator property of the views.
The main pattern I use is the follow:
New File
User Interface
Window
and save it asnameYouLike
New File
Cocoa
Objective-C class
ofNSWindowController
subclass and save is asnameYouLikeDelegate
File's Owner
Class
tonameYouLikeDelegate
window
and other objects you need of xib with anIBOutlet
tonameYouLikeDelegate.h
In some init/show method do this:
Save reference in some way (f.e. in
AppDelegate
orNSWindowController
of another window):Now when you need to create your window you use:
And to show it: