PhotoListViewController.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // PhotoListViewController.h
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/22.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class MovieListCellModel;
  10. typedef void(^DeleteImageCompletionCallBackType)(BOOL successful);
  11. @protocol PhotoListViewControllerDelegate <NSObject>
  12. - (void)deleteImage: (UIImage*)image completion: (DeleteImageCompletionCallBackType)completion;
  13. - (void)deleteImageWithName: (NSString*)name completion: (DeleteImageCompletionCallBackType)completion;
  14. - (void)deleteMovie: (MovieListCellModel*)model completion: (DeleteImageCompletionCallBackType)completion;
  15. @end
  16. @class AlbumCounterLabel;
  17. @class PCSButton;
  18. @class PhotoListCellModel;
  19. @interface PhotoListViewController : UIViewController<UICollectionViewDelegate>
  20. @property (nonatomic, weak, nullable) id<PhotoListViewControllerDelegate> delegate;
  21. @property (nonatomic, strong) NSMutableArray<__kindof PhotoListCellModel*>* cellModels;
  22. @property (nonatomic, readonly) NSInteger currentPageIndex;
  23. @property (nonatomic, weak) IBOutlet UICollectionView* photoCollectionView;
  24. @property (nonatomic, weak) IBOutlet PCSButton* backButton;
  25. @property (nonatomic, weak) IBOutlet PCSButton* deleteButton;
  26. @property (nonatomic, weak) IBOutlet AlbumCounterLabel* counterLabel;
  27. + (instancetype)makeViewController;
  28. - (void)setImagesInMemory:(NSArray<UIImage *> * _Nonnull)imagesInMemory andImageNamesOnDisk:(NSArray<NSString *> * _Nonnull)imageNamesOnDisk;
  29. - (IBAction)backButtonTouchUpInside:(id)sender;
  30. - (IBAction)deleteButtonTouchUpInside:(id)sender;
  31. - (void)deletedCachedResourceSuccessfulAtIndex: (NSInteger)deletedPageIndex;
  32. @end
  33. NS_ASSUME_NONNULL_END