FLEXKeyPathSearchController.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // FLEXKeyPathSearchController.h
  3. // FLEX
  4. //
  5. // Created by Tanner on 3/23/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "FLEXRuntimeBrowserToolbar.h"
  10. #import "FLEXMethod.h"
  11. @protocol FLEXKeyPathSearchControllerDelegate <UITableViewDataSource>
  12. @property (nonatomic, readonly) UITableView *tableView;
  13. @property (nonatomic, readonly) UISearchController *searchController;
  14. /// For loaded images which don't have an NSBundle
  15. - (void)didSelectImagePath:(NSString *)message shortName:(NSString *)shortName;
  16. - (void)didSelectBundle:(NSBundle *)bundle;
  17. - (void)didSelectClass:(Class)cls;
  18. @end
  19. @interface FLEXKeyPathSearchController : NSObject <UISearchBarDelegate, UITableViewDataSource, UITableViewDelegate>
  20. + (instancetype)delegate:(id<FLEXKeyPathSearchControllerDelegate>)delegate;
  21. @property (nonatomic) FLEXRuntimeBrowserToolbar *toolbar;
  22. /// Suggestions for the toolbar
  23. @property (nonatomic, readonly) NSArray<NSString *> *suggestions;
  24. - (void)didSelectKeyPathOption:(NSString *)text;
  25. - (void)didPressButton:(NSString *)text insertInto:(UISearchBar *)searchBar;
  26. @end