Parcourir la source

VLCMediaCategoryViewController: Search: Resign first responder on search

(closes #530)
Soomin Lee il y a 6 ans
Parent
commit
dea67effec
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 5 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -259,6 +259,11 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
         searchBar.setShowsCancelButton(false, animated: true)
         reloadData()
     }
+
+    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
+        searchBar.resignFirstResponder()
+    }
+
     func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
         searchDataSource.shouldReloadFor(searchString: searchText)
         reloadData()