From 77ccf157070941924f71507568d55bab5d4cc2a7 Mon Sep 17 00:00:00 2001 From: aryanbahmani Date: Sat, 26 Jan 2019 12:28:41 +0330 Subject: [PATCH] Update CardViewController.swift Fix CardView dismiss on panGesture --- CardsUI/CardViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/CardsUI/CardViewController.swift b/CardsUI/CardViewController.swift index 78b8ea5..7fc8cd4 100644 --- a/CardsUI/CardViewController.swift +++ b/CardsUI/CardViewController.swift @@ -59,6 +59,7 @@ class CardViewController: UIViewController { UIView.animate(withDuration: duration, delay: 0.0, options: [.allowUserInteraction], animations: { if velocity.y >= 0 { self.view.frame = CGRect(x: 0, y: self.partialView, width: self.view.frame.width, height: self.view.frame.height) + self.dismiss(animated: true, completion: nil) } else { self.view.frame = CGRect(x: 0, y: self.fullView, width: self.view.frame.width, height: self.view.frame.height) }