Procházet zdrojové kódy

Fix pasting not working in runtime browser

Tanner Bennett před 6 roky
rodič
revize
a32b4074f8

+ 8 - 3
Classes/GlobalStateExplorers/RuntimeBrowser/TBKeyPathSearchController.m

@@ -42,7 +42,6 @@
 @property (nonatomic) NSArray<NSArray<FLEXMethod *> *> *classesToMethods;
 @property (nonatomic) NSArray<NSArray<FLEXMethod *> *> *classesToMethods;
 @end
 @end
 
 
-#warning TODO there's no code to handle refreshing the table after manually appending ".bar" to "Bundle"
 @implementation TBKeyPathSearchController
 @implementation TBKeyPathSearchController
 
 
 + (instancetype)delegate:(id<TBKeyPathSearchControllerDelegate>)delegate {
 + (instancetype)delegate:(id<TBKeyPathSearchControllerDelegate>)delegate {
@@ -56,8 +55,14 @@
 
 
     delegate.tableView.delegate   = controller;
     delegate.tableView.delegate   = controller;
     delegate.tableView.dataSource = controller;
     delegate.tableView.dataSource = controller;
-    delegate.searchController.searchBar.delegate = controller;   
-    delegate.searchController.searchBar.keyboardType = UIKeyboardTypeWebSearch;
+    
+    UISearchBar *searchBar = delegate.searchController.searchBar;
+    searchBar.delegate = controller;   
+    searchBar.keyboardType = UIKeyboardTypeWebSearch;
+    searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
+    if (@available(iOS 11, *)) {
+        searchBar.smartInsertDeleteType = UITextSmartInsertDeleteTypeNo;
+    }
 
 
     return controller;
     return controller;
 }
 }