FLEXRuntime+UIKitHelpers.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // FLEXRuntime+UIKitHelpers.h
  3. // FLEX
  4. //
  5. // Created by Tanner Bennett on 12/16/19.
  6. // Copyright © 2019 Flipboard. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "FLEXProperty.h"
  10. #import "FLEXIvar.h"
  11. #import "FLEXMethod.h"
  12. @protocol FLEXRuntimeMetadata <NSObject>
  13. /// YES for properties and ivars which surely support editing, NO for all methods.
  14. @property (nonatomic, readonly) BOOL isEditable;
  15. /// NO for ivars, YES for supported methods and properties
  16. @property (nonatomic, readonly) BOOL isCallable;
  17. /// For internal use
  18. @property (nonatomic) id tag;
  19. - (UITableViewCellAccessoryType)suggestedAccessoryTypeWithTarget:(id)object;
  20. @end
  21. // Even if a property is readonly, it still may be editable
  22. // via a setter. Checking isEditable will not reflect that
  23. // unless the property was initialized with a class.
  24. @interface FLEXProperty (UIKitHelpers) <FLEXRuntimeMetadata> @end
  25. @interface FLEXIvar (UIKitHelpers) <FLEXRuntimeMetadata> @end
  26. @interface FLEXMethodBase (UIKitHelpers) <FLEXRuntimeMetadata> @end
  27. @interface FLEXMethod (UIKitHelpers) <FLEXRuntimeMetadata> @end