Swift - ContainerView 覆盖 ViewController

Swift - ContainerView covering ViewController

我有一个 ViewController 和一个 containerView。问题是我的 containerView 覆盖了我的 ViewController 所以我无法点击 ViewController.

里面的 buttons

我知道我可以 self.view.sendSubviewToBack(containerView) 但这并不能解决我的问题,因为我实际上希望 containerView(bottomBar + settingsButton) 在前台可见。

有什么方法可以让 containerView 位于 ViewController 之上,并且仍然能够单击 ViewController 中的按钮?

您需要反转包含,具有 addButton 和底栏的 vc 应该容纳另一个 vc,这样您就可以控制 childVC 的可见性(当你点击添加时弹出)通过将它发送回你需要它在它上面可见的地方