1、新建UIViewController类,如下:
class RouterViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
2、xib如下:
3、显示RouterViewController:
let router = RouterViewController();
self.present(router, animated: true, completion: nil);
总结:
上述使用中,未明确加载xib,但还是自动加载了。