소스 검색

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.