Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Storyboard/StoryboardSceneBased.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public extension StoryboardSceneBased where Self: UIViewController {
- returns: instance of the conforming ViewController
*/
static func instantiate() -> Self {
let storyboard = Self().storyboard
guard let vc = storyboard?.instantiateViewController(withIdentifier: self.sceneIdentifier) as? Self else {
let storyboard = (Self.self as StoryboardSceneBased.Type).storyboard
guard let vc = storyboard.instantiateViewController(withIdentifier: self.sceneIdentifier) as? Self else {
fatalError("The viewController '\(self.sceneIdentifier)' of '\(storyboard)' is not of class '\(self)'")
}
return vc
Expand Down