这是我的代码。
popoverMenuViewController = displayViewController?.popoverPresentationController
popoverMenuViewController?.permittedArrowDirections = UIPopoverArrowDirection(rawValue:0)
popoverMenuViewController?.sourceView = sourceViewForPopOver
popoverMenuViewController?.sourceRect = CGRect(x: sourceViewForPopOver!.bounds.midX, y: sourceViewForPopOver!.bounds.midY,width: 0,height: 0)
self.present(displayViewController!, animated: true, completion: nil)
我没有设置passthroughView = nil。但是,我仍然无法驳回提出的观点。
答案 0 :(得分:0)
您提供了一个视图控制器。要解雇它,你只需要调用它
self.dismiss(animated: true, completion: nil)