I always only use Storyboard ID and never use the checkbox Use Storyboard ID so wondering when it is required to use the checkbox.
These options are located in the Identity Inspector at xcode
Thanks!
The storyboard ID is a String field that you can use to create a new ViewController based on that storyboard ViewController.
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.
Use Storyboard ID will reuse the Storyboard ID as the Restoration ID for the Scene.
See how when you check Use Storyboard ID it prepopulates the RestorationID?
Restoration Identifier is used to restore state of your View Controller. If we want to implement app state restoration in our app, we must use restoration identifiers for the view controllers that we want to be restored. General rule for setting the restoration identifier is to use the string of the Storyboard Identifier. We can use a totally different meaningful string for Restoration ID if we want. However, it is always neat to just use same name that Storyboard uses. Checking the Use Storyboard Identifier on just copies the string from Storyboard Identifier to it and uses it.
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