From 895790f6978e2c82a171f626778dc12248c580e2 Mon Sep 17 00:00:00 2001 From: Shin Yamamoto Date: Fri, 28 May 2021 12:58:08 +0900 Subject: [PATCH] Update README for the backdrop tap-to-dismiss action --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 5a9cdf2f..03966698 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ The new interface displays the related contents and utilities in parallel as a u - [Create an additional floating panel for a detail](#create-an-additional-floating-panel-for-a-detail) - [Move a position with an animation](#move-a-position-with-an-animation) - [Work your contents together with a floating panel behavior](#work-your-contents-together-with-a-floating-panel-behavior) + - [Enabling the tap-to-dismiss action of the backdrop view](#enabling-the-tap-to-dismiss-action-of-the-backdrop-view) - [Notes](#notes) - ['Show' or 'Show Detail' Segues from `FloatingPanelController`'s content view controller](#show-or-show-detail-segues-from-floatingpanelcontrollers-content-view-controller) - [UISearchController issue](#uisearchcontroller-issue) @@ -658,6 +659,14 @@ class ViewController: UIViewController, FloatingPanelControllerDelegate { } ``` +### Enabling the tap-to-dismiss action of the backdrop view + +The tap-to-dismiss action is disabled by default. So it needs to be enabled as below. + +```swift +fpc.backdropView.dismissalTapGestureRecognizer.isEnabled = true +``` + ## Notes ### 'Show' or 'Show Detail' Segues from `FloatingPanelController`'s content view controller