[英]TabBarController viewDidAppear not called when presented view controller dismissed
I am trying present a navigation controller with UITabBarController, I am confused why UITabBarController's viewDidAppear is not called again after the navigation controller dismissed.我正在尝试使用 UITabBarController 呈现一个导航控制器,我很困惑为什么在导航控制器关闭后没有再次调用 UITabBarController 的 viewDidAppear。 How can I manage to do that?
我怎样才能做到这一点?
Change presentation style to currentContext
.将演示文稿样式更改为
currentContext
。 For example:例如:
let controller = ViewController()
controller.modalPresentationStyle = .currentContext //<-- Add this line
self.present(controller, animated: true, completion: nil)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.