I'm adding a new storyboard reference:
But I'm getting this error:
error: Main.storyboard references the initial view controller of newStoryBoard.storyboard, but no designated entry point was found.
any of you knows why I'm getting this error?
I'll really appreciated your help.
In the Storyboard, select the view controller that you want to instantiate in code. Make sure the yellow circle is highlighted, and click on the Identity Inspector. Set the custom class as well as the field called "Storyboard ID". You can use the class name as the Storyboard ID.
Create a new IBOutlet called shakeButton for your storyboard button in your ViewController. swift file. Select the shake button in Interface Builder. Then hold down the control button ( ⌃ ) and click-drag from the storyboard button into your ViewController.
The initial view controller acts as an entry point into the storyboard. You are going to add and configure another view controller to the canvas and set it to be the initial view controller for the storyboard.
This is a storyboard reference, pointing to another storyboard named newStoryBoard
. For the segue to work, it needs to know which view controller it should open from that storyboard.
Open newStoryBoard.storyboard
, select the appropriate view controller, and check the Is Initial View Controller box in the properties panel on the right:
Alternatively, you can set the Referenced Id in the storyboard reference properties. Set it to the storyboard Id of the view controller you want to open, and you should be all set.
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