Explorar o código

local network: prevent NSInvalidArgumentException on iOS 6 since the searchbar style setter was introduced in iOS 7

Felix Paul Kühne %!s(int64=11) %!d(string=hai) anos
pai
achega
9855cbf06b
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Sources/VLCLocalServerFolderListViewController.m

+ 2 - 1
Sources/VLCLocalServerFolderListViewController.m

@@ -133,7 +133,8 @@
     _searchDisplayController.delegate = self;
     _searchDisplayController.searchResultsDataSource = self;
     _searchDisplayController.searchResultsDelegate = self;
-    _searchDisplayController.searchBar.searchBarStyle = UIBarStyleBlack;
+    if (SYSTEM_RUNS_IOS7_OR_LATER)
+        _searchDisplayController.searchBar.searchBarStyle = UIBarStyleBlack;
     _searchBar.delegate = self;
     self.tableView.tableHeaderView = _searchBar; //this line add the searchBar on the top of tableView.