瀏覽代碼

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

Felix Paul Kühne 11 年之前
父節點
當前提交
9855cbf06b
共有 1 個文件被更改,包括 2 次插入1 次删除
  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.