简体   繁体   English

TabBarController viewDidAppear 在呈现的视图控制器关闭时未调用

[英]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.

相关问题 解除模态视图时未调用ViewDidAppear - ViewDidAppear not called when the modal view is dismissed 检测何时关闭呈现的视图控制器 - Detect when a presented view controller is dismissed 模态显示/关闭视图控制器时通知? - Notification when view controller is presented modally/dismissed? 在弹出窗口上显示模式视图时,不会在主视图中调用ViewDidAppear - ViewDidAppear not called in main view when modal view is presented over a popover 关闭呈现的视图控制器时如何恢复焦点? - How to restore focus when presented view controller is dismissed? 当通过手势关闭呈现的视图 controller 时如何获得通知? - How to get notified when a presented view controller is dismissed with a gesture? 调用viewWillAppear时显示视图控制器的问题被解除 - Issue with calling viewWillAppear of presenting view controller when presented one is dismissed 为什么简单的模态视图控制器在显示和关闭时会滞后? - Why would a simple modal view controller lag when presented and dismissed? 我的viewDidAppear没有在视图控制器中调用 - My viewDidAppear not called in view controller 推送视图控制器-viewDidAppear未调用 - Pushing View Controller - viewDidAppear not called
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM