【问题标题】:TabBarController viewDidAppear not called when presented view controller dismissedTabBarController viewDidAppear 未在呈现的视图控制器关闭时调用
【发布时间】:2021-12-16 19:49:12
【问题描述】:

我正在尝试使用 UITabBarController 提供导航控制器,我很困惑为什么在导航控制器关闭后没有再次调用 UITabBarController 的 viewDidAppear。我怎样才能做到这一点?

【问题讨论】:

    标签: ios viewcontroller tabbarcontroller


    【解决方案1】:

    将演示文稿样式更改为currentContext。例如:

    let controller = ViewController()
    controller.modalPresentationStyle = .currentContext //<-- Add this line
    self.present(controller, animated: true, completion: nil)
    

    【讨论】:

      猜你喜欢
      • 2017-04-07
      • 1970-01-01
      • 2020-05-30
      • 1970-01-01
      • 2014-12-15
      • 1970-01-01
      • 2011-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多