-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with multiple scenes in one Storyboard #52
Comments
Hi Reusable is totally able to do this, and As explained in the README here (don't hesitate to click on the little black triangles to open the collapsed examples in that README btw), when you're using ( class IntroViewController: StoryboardSceneBased {
static let sceneStoryboard = UIStoryboard(name: "Intro", bundle: nil)
}
class SplashViewController: StoryboardSceneBased {
static let sceneStoryboard = UIStoryboard(name: "Intro", bundle: nil)
}
class ViewController1: StoryboardSceneBased {
static let sceneStoryboard = UIStoryboard(name: "Main", bundle: nil)
}
class ViewController2: StoryboardSceneBased {
static let sceneStoryboard = UIStoryboard(name: "Main", bundle: nil)
}
… PS: Note/Tip: to avoid repeating the string literals corresponding to the storyboard names and avoid making mistakes, I recommend to either:
enum Storyboards {
static let intro = UIStoryboard(name: "Intro", bundle: nil)
static let main = UIStoryboard(name: "Main", bundle: nil)
}
class IntroViewController: StoryboardSceneBased {
static let sceneStoryboard = Storyboards.intro
}
class SplashViewController: StoryboardSceneBased {
static let sceneStoryboard = Storyboards.intro
}
…
|
@AliSoftware Thanks a lot for the quick feedback! |
Hi!
I'm stuck with instantiating controllers from Storyboards. In my project, I have several storyboards with multiple scenes(controllers) in each storyboard.
In my ViewController I use protocol StoryboardSceneBased, but obviously, it is not working.
Does Reusable ability to instantiate controllers like I need?
The text was updated successfully, but these errors were encountered: