I had a TestViewController.swift and a TestViewController.xib presenting the layout of TestViewController.
To load this view controller I had this method:
Everything works well, but if I call empty initializer:
Or with nil nibname
l
The application also continues to work without changes. What's the point in explicitly specifying the name of the xib file? What is the difference between three calls in this case?
To load this view controller I had this method:
Code Block let vc = TestViewController(nibName: "TestViewController", bundle: nil) self.navigationController?.pushViewController(vc, animated: true)
Everything works well, but if I call empty initializer:
Code Block let vc = TestViewController() self.navigationController?.pushViewController(vc, animated: true)
Or with nil nibname
l
Code Block et vc = TestViewController(nibName: nil, bundle: nil) self.navigationController?.pushViewController(vc, animated: true)
The application also continues to work without changes. What's the point in explicitly specifying the name of the xib file? What is the difference between three calls in this case?