Browse Source

VLCMediaCategoryViewController: Search: Resign first responder on search

(closes #530)
Soomin Lee 6 years ago
parent
commit
dea67effec
1 changed files with 5 additions and 0 deletions
  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()