Explorar o código

Automatically activate search bar in heap explorer

2f952c38 apparently didn't do this, oops
Tanner Bennett %!s(int64=5) %!d(string=hai) anos
pai
achega
3276eb3516
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      Classes/GlobalStateExplorers/FLEXLiveObjectsController.m

+ 9 - 0
Classes/GlobalStateExplorers/FLEXLiveObjectsController.m

@@ -45,6 +45,15 @@ static const NSInteger kFLEXLiveObjectsSortBySizeIndex = 2;
     [self reloadTableData];
 }
 
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        // This doesn't work unless it's wrapped in this dispatch_async call
+        [self.searchController.searchBar becomeFirstResponder];
+    });
+}
+
 - (NSArray<NSString *> *)allClassNames {
     return self.instanceCountsForClassNames.allKeys;
 }