I had take one ViewController with separate nib file. and my initial root viewcontroller is set in the storyBoard. Now the problem is that when I push to this controller the Vi
solution with type casting:
extension UIViewController { static func initFromNib() -> Self { func instanceFromNib() -> T { return T(nibName: String(describing: self), bundle: nil) } return instanceFromNib() } }
enjoyment:
let testVC = TestVC.initFromNib() testVC.someCustomParam = "someValue"