let dealsSeeMoreViewController = DealsSeeMoreViewController(owner: self)
self.dealsStackView.addArrangedSubview(dealsSeeMoreViewController.view)
只写上面两句的话,dealsSeeMoreViewController可能已经被释放,所以view里面的点击事件会不响应。
要把dealsSeeMoreViewController加进来,如下:
self.addChildViewController(dealsSeeMoreViewController)
dealsSeeMoreViewController.didMoveToParentViewController(self)