我想从表单元格调用具有透明背景的UIView。
let myView = MyViewController()
myView.view.backgroundColor = .clear
tableController.present(myView, animated: true, completion: nil)
[myView.modalPresentationStyle = .fullScreen
]更糟-删除背景视图。
您可以在具有透明背景的.fullscreen模式下显示新的viewController
providesPresentationContextTransitionStyle
和definesPresentationContext
viewController属性设置为true
这是您如何以编程方式进行的操作
//apply that for viewController that will be displayed at the top
viewController.modalPresentationStyle = .fullScreen
viewController.providesPresentationContextTransitionStyle = true
viewController.definesPresentationContext = true
viewController.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext