要使present出来的页面全屏,可以按照以下步骤进行设置:

  1. 在被present的视图控制器(thirdVC)中,将以下代码添加到viewDidLoad()方法中:
modalPresentationStyle = .fullScreen
  1. 在调用present()方法的地方,确保传入的第一个参数为thirdVC,第二个参数为true,如下所示:
present(thirdVC, animated: true, completion: nil)

通过以上步骤,present出来的页面应该会以全屏的方式显示。

swift中presentthirdVC animated true出来的页面不是全屏怎么解决

原文地址: https://www.cveoy.top/t/topic/hLnk 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录