let fileTypePopUP = FileTypePopUP(nibName: "FileTypePopUP", bundle: nil)
fileTypePopUP.delegate = self
fileTypePopUP.modalPresentationStyle = .fullScreen
self.present(fileTypePopUP, animated: true)
Inside Filetypepopup,我的视图具有透明的背景,一个子视图覆盖了屏幕高度的一半。问题在于,全屏模态没有显示背景为透明,而是显示黑色背景。
我尝试了什么:
设置self.view.backgroundColor = .clearinfiletypePopup.
使用.modalPresentationStyle = .overfullscreen 我在顶部和底部有空间 如此图像
检查呈现的视图的顶部和底部约束(FileTypePopup View)。约束应匹配监督的顶部和底部,而不是SafeArea。