FHSViewSnapshot.h 969 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // FHSViewSnapshot.h
  3. // FLEX
  4. //
  5. // Created by Tanner Bennett on 1/9/20.
  6. // Copyright © 2020 FLEX Team. All rights reserved.
  7. //
  8. #import "FHSView.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface FHSViewSnapshot : NSObject
  11. + (instancetype)snapshotWithView:(FHSView *)view;
  12. @property (nonatomic, readonly) FHSView *view;
  13. @property (nonatomic, readonly) NSString *title;
  14. /// Whether or not this view item should be visually distinguished
  15. @property (nonatomic, readwrite) BOOL important;
  16. @property (nonatomic, readonly) CGRect frame;
  17. @property (nonatomic, readonly) BOOL hidden;
  18. @property (nonatomic, readonly) UIImage *snapshotImage;
  19. @property (nonatomic, readonly) NSArray<FHSViewSnapshot *> *children;
  20. @property (nonatomic, readonly) NSString *summary;
  21. /// Returns a different color based on whether or not the view is important
  22. @property (nonatomic, readonly) UIColor *headerColor;
  23. - (FHSViewSnapshot *)snapshotForView:(UIView *)view;
  24. @end
  25. NS_ASSUME_NONNULL_END