テーブルビューでビューコンテナを作ろうとしています。それはうまくいきますが、最後の行を選択すると、メソッドdidSelectRowAt indexPath:
をトリガーできません。これは私のコードです:
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
let controller = storyboard.instantiateViewController(withIdentifier: "pageViewController") as! PageViewController
addChildViewController(controller)
controller.customDelegate = self
controller.index = index
self.controller = controller
//Add Controllers
let clientInfoVC = storyboard.instantiateViewController(withIdentifier: "ClientInfo") as! ClientInfoViewController
clientInfoVC.client = self.client
let clientRequestsVC = storyboard.instantiateViewController(withIdentifier: "ClientRequests") as! ClientProductRequestViewController
clientRequestsVC.client = self.client
let clientDebtsVC = storyboard.instantiateViewController(withIdentifier: "ClientDebts") as! ClientDebtViewController
clientDebtsVC.client = self.client
controller.orderedViewControllers = [clientInfoVC,clientRequestsVC,clientDebtsVC]
controller.view.frame = CGRect(x: 0, y: 0, width: self.clientContainerView.frame.width, height: self.clientContainerView.frame.height)
self.clientContainerView.addSubview(controller.view)
controller.didMove(toParentViewController: self)
そして、これは私のコンテナビューです:
私は何を間違っていますか?私を助けてください