如何在 iPad 上全屏显示视图控制器

问题描述

我有一个视图控制器,我可以在 iPhone 上以全屏模式呈现它,但在 ipad 上它不会变成全屏。 (它是一个以 iPad 为中心的小屏幕)

    iVC.modalPresentationStyle = .fullScreen
    iVC.presentFullScreen(myVC,animated: true)

我试过了

iVC.modalPresentationStyle = .overFullScreen

任何想法请

解决方法

modalPresentationStyle 需要为 .fullScreen 的视图控制器是 myVC,而不是 iVC