How to properly create storyboards in xCode6 using Interface Builder and Swift

I need help using Interface Builder to create a storyboard and an initial view using xCode 6 and Swift. I do not want to start with the "Single View Application" template, but with the "Empty Application" - for educational purposes.

I start with File-> New-> Application in xCode 6. In the left pane, I selected iOS-> Application, and I select the "Empty Application" template

So now I have my empty application, and I want to use Interface Builder to create a story pane.

I select File-New-File, and then select iOS-User Interface in the left pane and select Storyboard in the right pane. I call my storyboard "Home"

It doesn’t do anything, therefore, exploring other templates, I decided that I need to go to info.plist and add a key / value pair, and therefore in info.plist I added the key "Main base of storyboard files name" and the value "Main"

After that, I get the error message:

Failed to create default view controller instance for UIMainStoryboardFile 'Main' - maybe the assigned entry point is not set?

So, now I go to the story panel and drag "View Controller" onto the storyboard, and btw - in the inspector of the "View" controller, the "start scene -" Start view controller "is checked

But this does not create a fast file - what can be expected, but just to be clear, it is not. Now when I try to start, I get an error message:

, .

, - ? , Interface Builder , , , , , , , , , .

: . , - , - .

+4
1

. , . didFinishLaunchingWithOptions, "return true". .

+3

Source: https://habr.com/ru/post/1544611/


All Articles