Starting out with storyboards (on Mac)
Starting out with storyboards (on Mac)
- Subject: Starting out with storyboards (on Mac)
- From: Daryle Walker <email@hidden>
- Date: Tue, 01 Mar 2016 04:33:13 -0500
Apologies for this 101 question.
Tried out Mac programming a couple of years ago, pre-Swift and when storyboards were about to come out for the Mac. I used XIBs back then. Forward to a couple months ago, and I tried out a Mac programming book. I started a new Xcode (7) default project (no docs, no Core Data) and turned on both Swift and storyboards. The app shows a window when I first run it. I’m thinking of being more formal and implement a New command.
I guess I can use "+ storyboardWithName: bundle:” and "- instantiateControllerWithIdentifier:” to create a new window. But where does the default one come from? Why did it initiate? Is it because the window in the Main storyboard has the initial arrow on it? How can I turn off the current automatic window on app-open? (I’ll reimplement it with openUntitledFile.)
I remember for my first project a few years ago that I had to have an array of NSWindow in my application delegate so each window keeps a reference around. How is the storyboard's window in the new default app staying around without an (obvious) reference? There are no properties keeping a window reference in the default code for the application delegate? Does this mean I now don’t have to keep references for windows either?
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden