FLEXLayerShortcuts.m 830 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // FLEXLayerShortcuts.m
  3. // FLEX
  4. //
  5. // Created by Tanner Bennett on 12/12/19.
  6. // Copyright © 2020 FLEX Team. All rights reserved.
  7. //
  8. #import "FLEXLayerShortcuts.h"
  9. #import "FLEXShortcut.h"
  10. #import "FLEXImagePreviewViewController.h"
  11. @implementation FLEXLayerShortcuts
  12. + (instancetype)forObject:(CALayer *)layer {
  13. return [self forObject:layer additionalRows:@[
  14. [FLEXActionShortcut title:@"Preview Image" subtitle:nil
  15. viewer:^UIViewController *(CALayer *layer) {
  16. return [FLEXImagePreviewViewController previewForLayer:layer];
  17. }
  18. accessoryType:^UITableViewCellAccessoryType(CALayer *layer) {
  19. return CGRectIsEmpty(layer.bounds) ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
  20. }
  21. ]
  22. ]];
  23. }
  24. @end