I try to transfer an existing cocoa application to make use of the new storyboards for OS X with XCode6 (Beta2). I added a new blank storyboard file and set it as the main interface of my application.
However, I have no idea how to link my NSApplication to this storyboard.
When I start a new project using storyboards I see a scene called application scene. It includes the Application (NSApplication object), Main Menu, AppDelegate...
How can I add an application object (i.e. an application scene) to a blank storyboard?
Is there something analogous to window controller and view controller objects which can be dragged on the storyboard?
In the Storyboard toolbar, click the New Scene button. Right-click on a panel and select New Scene. In the top menu, select Storyboard > New > New Scene.
Create a New Scene File First, add a new scene file to your project through Xcode's File menu > New... > File > (choose your platform tab) > SpriteKit Scene.
You have SwiftUI enabled in your project, which does not use storyboards anymore. Your layout is inside the ContentView. swift file. If you do want to work the old way, with storyboards, you should uncheck 'Use SwiftUI' in the project creation screen.
Your new project has been created, now navigate to the left side of your interface, select the “Main. storyboard” file in the main folder, left-click and hit delete.
As a quicker alternative, you could copy the Application Scene from a new project to your existing one:
You'll now have an Application Scene in your existing project, which saves a lot of time compared to copying everything over to a new project.
Some people at the Apple Developer Forum seem to have the same problem as well: Mac Storyboard and Application Menus
It seems that currently there is no out-of-the-box way of migrating an existing application to use storyboards. That's true at least for XCode6 Beta2.
I ended up creating a new project and transferring my existing code base manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With