From 9eb4b6a0719a3e5f294dabeaf68af471a9fa711d Mon Sep 17 00:00:00 2001 From: Fin Date: Thu, 5 Aug 2021 16:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=96=E5=8A=A8=E5=8E=86=E5=8F=B2=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=88=97=E8=A1=A8=E6=97=B6=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E9=94=AE=E7=9B=98=E5=9C=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=88=99=E9=9A=90=E8=97=8F=E6=8E=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/MessageListViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Controller/MessageListViewController.swift b/Controller/MessageListViewController.swift index 927555e..33fe801 100644 --- a/Controller/MessageListViewController.swift +++ b/Controller/MessageListViewController.swift @@ -233,3 +233,11 @@ extension MessageListViewController: UITableViewDelegate { return configuration } } + +extension MessageListViewController { + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { + if self.navigationItem.searchController?.searchBar.isFirstResponder == true{ + self.navigationItem.searchController?.searchBar.resignFirstResponder() + } + } +}