FLEXObjectExplorerViewController.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // FLEXObjectExplorerViewController.h
  3. // Flipboard
  4. //
  5. // Created by Ryan Olson on 2014-05-03.
  6. // Copyright (c) 2020 FLEX Team. All rights reserved.
  7. //
  8. #ifndef _FLEXObjectExplorerViewController_h
  9. #define _FLEXObjectExplorerViewController_h
  10. #endif
  11. #import "FLEXFilteringTableViewController.h"
  12. #import "FLEXObjectExplorer.h"
  13. @class FLEXTableViewSection;
  14. NS_ASSUME_NONNULL_BEGIN
  15. /// A class that displays information about an object or class.
  16. ///
  17. /// The explorer view controller uses \c FLEXObjectExplorer to provide a description
  18. /// of the object and list it's properties, ivars, methods, and it's superclasses.
  19. /// Below the description and before properties, some shortcuts will be displayed
  20. /// for certain classes like UIViews. At very bottom, there is an option to view
  21. /// a list of other objects found to be referencing the object being explored.
  22. @interface FLEXObjectExplorerViewController : FLEXFilteringTableViewController
  23. /// Uses the default \c FLEXShortcutsSection for this object as a custom section.
  24. + (instancetype)exploringObject:(id)objectOrClass;
  25. /// No custom section unless you provide one.
  26. + (instancetype)exploringObject:(id)objectOrClass customSection:(nullable FLEXTableViewSection *)customSection;
  27. /// The object being explored, which may be an instance of a class or a class itself.
  28. @property (nonatomic, readonly) id object;
  29. /// This object provides the object's metadata for the explorer view controller.
  30. @property (nonatomic, readonly) FLEXObjectExplorer *explorer;
  31. /// Called once to initialize the list of section objects.
  32. ///
  33. /// Subclasses can override this to add, remove, or rearrange sections of the explorer.
  34. - (NSArray<FLEXTableViewSection *> *)makeSections;
  35. /// Whether to allow showing/drilling in to current values for ivars and properties. Default is YES.
  36. @property (nonatomic, readonly) BOOL canHaveInstanceState;
  37. /// Whether to allow drilling in to method calling interfaces for instance methods. Default is YES.
  38. @property (nonatomic, readonly) BOOL canCallInstanceMethods;
  39. /// If the custom section data makes the description redundant, subclasses can choose to hide it. Default is YES.
  40. @property (nonatomic, readonly) BOOL shouldShowDescription;
  41. @end
  42. NS_ASSUME_NONNULL_END