容器视图不检查滚动中的 UITableView 数据?

Container view does not check UITableView data in scroll?

我以编程方式创建了一个带有子 ViewController 的容器视图。子视图包含 UITableView 但我无法滚动 UITableView(如果我滚动数据从 UITableView 隐藏)。

let VC = self.storyboard?.instantiateViewController(withIdentifier: "roomList") as! roomListViewController
VC.view.frame = CGRect(x: 0, y: 0, width: (containerView?.frame.size.width)!, height: (containerView?.frame.size.height)!)
  ///  self.containerView?.isHidden = false
  self.containerView?.addSubview(VC.view)
  let flipDirection: UIViewAnimationOptions = flipped ? .transitionFlipFromTop : .transitionFlipFromBottom
  let options: UIViewAnimationOptions = [flipDirection, .showHideTransitionViews]
  UIView.transition(from: VC.view, to: VC.view, duration: 0.6, options: options) {
        finished in

    }

我已经修复了 addChildViewController(VC) 和 VC.didMove(toParentViewController: self) parent methods.my 工作代码是

        let VC = self.storyboard?.instantiateViewController(withIdentifier: "roomList") as! roomListViewController
        addChildViewController(VC)
        VC.view.frame = CGRect(x: 0, y: 0, width: (containerView?.frame.size.width)!, height: (containerView?.frame.size.height)!)
        VC.delegate = self

        self.containerView?.addSubview(VC.view)
        //controller.didMoveToParentViewController(self)
        VC.didMove(toParentViewController: self)
        let flipDirection: UIViewAnimationOptions = flipped ? .transitionFlipFromTop : .transitionFlipFromBottom
        let options: UIViewAnimationOptions = [flipDirection, .showHideTransitionViews]
        UIView.transition(from: VC.view, to: VC.view, duration: 0.6, options: options) {
            finished in

            //cardModel.flipped = !flipped
        }