cara mengabaikan tampilan saat menyentuh di dalam Swift

 override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
    {
        let touch = touches.first
        if touch?.view != self.yourView
        { self.dismiss(animated: true, completion: nil) }
    }
Homeless Hare