【问题标题】:iOS 13 - Segue modally to a new storyboard nv/vc in full screen programmaticallyiOS 13 - 以编程方式以全屏模式将新故事板 nv/vc 转为模态
【发布时间】:2019-09-30 09:10:58
【问题描述】:

随着新的 iOS 13 升级,我的应用现在不会全屏显示我的模态转场。我该如何解决这个问题?

    let viewController:UIViewController = UIStoryboard(name: "Admin", bundle: nil).instantiateViewController(withIdentifier: "AdminNav") as UIViewController
    self.present(viewController, animated: true, completion: nil) 

【问题讨论】:

    标签: xcode ios13 swift5


    【解决方案1】:

    您需要将modalPresentationStyle 设置为.fullScreen

    let viewController = UIStoryboard(name: "Admin", bundle: nil).instantiateViewController(withIdentifier: "AdminNav")
    viewController.modalPresentationStyle = .fullScreen
    present(viewController, animated: true, completion: nil) 
    

    【讨论】:

      猜你喜欢
      • 2021-08-29
      • 2012-10-08
      • 1970-01-01
      • 2011-09-27
      • 1970-01-01
      • 1970-01-01
      • 2014-02-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多