Parcourir la source

MediaCategoryViewController: Search: Resign responder on scroll

Soomin Lee il y a 5 ans
Parent
commit
2fb6bdb25d
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 3 - 1
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -220,7 +220,9 @@ class MediaCategoryViewController: UICollectionViewController, UICollectionViewD
 
     override func scrollViewDidScroll(_ scrollView: UIScrollView) {
         // This ensures that the search bar is always visible like a sticky while searching
-        guard !isSearching else {
+        if isSearching {
+            searchBar.endEditing(true)
+            delegate?.enableCategorySwitching(for: self, enable: true)
             return
         }