iOS13 present不是全屏

2019-10-12  本文已影响0人  雷霸龙

iOS13更新之后,present到新的页面,没有全屏显示,这是因为增加了一个控制器属性modalPresentationStyle,默认值是auto,也就不是全屏的,我们可以在present之前修改此属性为.fullScreen,加入从A控制器跳转到B控制器,则

self.modalPresentationStyle = .fullScreen
let vc = BViewController()
vc.modalPresentationStyle = .fullScreen
present(vc, animated: true, completion: nil)
上一篇 下一篇

猜你喜欢

热点阅读