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?
The main pattern I use is the follow:
New FileUser InterfaceWindowand save it asnameYouLikeNew FileCocoaObjective-C classofNSWindowControllersubclass and save is asnameYouLikeDelegateFile's OwnerClasstonameYouLikeDelegatewindowand other objects you need of xib with anIBOutlettonameYouLikeDelegate.hIn some init/show method do this:
Save reference in some way (f.e. in
AppDelegateorNSWindowControllerof another window):Now when you need to create your window you use:
And to show it: