【问题标题】:How to present VC on VC which is presented on Tabbar如何在 Tabbar 上呈现的 VC 上呈现 VC
【发布时间】:2021-09-11 20:14:16
【问题描述】:

当尝试使用vc1.modalPresentationStyle = .overFullScreen 呈现 VC1 时 在带有vc2.modalPresentationStyle = .overFullScreen 的 TabBar 上显示的 VC2 上没有显示 VC2 并且在控制台中获取消息:

Attempt to present <Demo.Secreen2VC: 0x7fb103088260> on
 <UINavigationController: 0x7fb10282da00> (from <UINavigationController: 
0x7fb1020a9000>) which is already presenting <Demo.Secreen1VC: 0x7fb10142aee0>.

我认为我们不能在另一个呈现风格的 VC 上呈现 VC:vc1.modalPresentationStyle = .overFullScreen

任何帮助都将不胜感激。谢谢

【问题讨论】:

  • 添加当前代码行????
  • @Sh_Khan 不,它只是演示风格和简单的 vc 演示为self.navigationController?.present(vc, animated: true, completion: nil)

标签: ios swift uiviewcontroller


【解决方案1】:

使用

self.present(vc, animated: true, completion: nil)

第二个礼物

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-20
    • 1970-01-01
    • 2018-05-06
    • 1970-01-01
    • 1970-01-01
    • 2013-05-04
    • 1970-01-01
    • 2018-11-21
    相关资源
    最近更新 更多