I don\'t know if this is the right key to search \"add UIViewController in subview\". As what you can see in my image ,there are two ViewController, the main and the second
let controller:SecondViewController = self.storyboard!.instantiateViewController(withIdentifier: "secondViewController") as! SecondViewController
controller.view.frame = self.view.bounds
controller.willMove(toParent: self)
self.view.addSubview(controller.view)
self.addChild(controller)
controller.didMove(toParent: self)