I am trying to to add UIPageViewController as a child to the MainViewController, the UIPageViewController has 2 ViewContrllers, the problem is I can't interact with any of the views that belong to the view controllers of the ui page view controller, can't press buttons I tried to make userInteraction enabled for all the views inside the UIPageView Controller also tried the NSLayoutConstraint but couldn't get it to work , this is the way i added the ui page view controller to the main controller as a child
let uiPC = MyUIPageViewController(vm: vm)
uiPC.view.frame = containerView.frame
containerView.addSubview(uiPC.view)
addChild(uiPC)
uiPC.didMove(toParent: self)
also tried the constraint solution to set the view of the page controller with the view of the container view but no luck, can't get the user interaction to be enabled. the only way that work is either adding the views of the ViewControllers as a subview or add the 2 view controller of UIPageviewContoller as a child to the MainViewController adding the UIPageViewController as a child inside the MainViewController