📅  最后修改于: 2022-03-11 15:00:58.634000             🧑  作者: Mango
override func touchesBegan(_ touches: Set, with event: UIEvent?)
{
let touch = touches.first
if touch?.view != self.yourView
{ self.dismiss(animated: true, completion: nil) }
}