I am doing this to move a ViewController(viewController) to other ViewController(mainMenuViewController) :
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewController(withIdentifier: "subView")
addChildViewController(controller)
view.addSubview(controller.view)
controller.view.frame.size.width = 375
controller.view.frame.size.height = 198
controller.didMove(toParentViewController: self)
viewController get moved to mainMenuViewController but problem is that I can't see the the other items like tableView, button I have added to mainMenuViewController