Browse Source

Mute deprecated warning with less pre-processor noise

Max Odnovolyk 9 years ago
parent
commit
03c96d8fdb

+ 4 - 4
Classes/GlobalStateExplorers/FLEXFileBrowserTableViewController.m

@@ -316,7 +316,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
 
@@ -334,7 +334,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
 
@@ -345,9 +345,9 @@
 
 - (void)reloadDisplayedPaths
 {
-    if (self.searchDisplayController.isActive) {
+    if (self.searchController.isActive) {
         [self reloadSearchPaths];
-        [self.searchDisplayController.searchResultsTableView reloadData];
+        [self.searchController.searchResultsTableView reloadData];
     } else {
         [self reloadChildPaths];
         [self.tableView reloadData];

+ 5 - 2
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -62,7 +62,10 @@
 
     UISearchBar *searchBar = [[UISearchBar alloc] init];
     [searchBar sizeToFit];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     self.searchController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
+#pragma clang diagnostic pop
     self.searchController.delegate = self;
     self.searchController.searchResultsDataSource = self;
     self.searchController.searchResultsDelegate = self;
@@ -358,9 +361,9 @@
             return [[transaction.request.URL absoluteString] rangeOfString:searchString options:NSCaseInsensitiveSearch].length > 0;
         }]];
         dispatch_async(dispatch_get_main_queue(), ^{
-            if ([self.searchDisplayController.searchBar.text isEqual:searchString]) {
+            if ([self.searchController.searchBar.text isEqual:searchString]) {
                 self.filteredNetworkTransactions = filteredNetworkTransactions;
-                [self.searchDisplayController.searchResultsTableView reloadData];
+                [self.searchController.searchResultsTableView reloadData];
             }
         });
     });