我在使用.overCurrentContext modalPresentationStyletvOS视图控制器时遇到问题:
let vc = UIStoryboard(name: "", bundle: Bundle.main).instantiateInitialViewController() //representative of actually presented VC
vc.modalPresentationStyle = .overCurrentContext
present(vc, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
在呈现的视图控制器上,按下菜单按钮将停止返回到呈现视图控制器.将其设置为.overFullScreen和时也会发生这种情况.blurOverFullScreen.但是,在将其设置为.currentContext或时,我没有遇到此类问题.fullScreen.在使用某些特定UIModalPresentationStyle的东西时,是否有任何特殊需要使用?