#import @class PGPhotoFilter; @class PGPhotoTool; @protocol TGPhotoEditorCollectionViewFiltersDataSource; @protocol TGPhotoEditorCollectionViewToolsDataSource; @interface TGPhotoEditorCollectionView : UICollectionView @property (nonatomic, copy) void(^interactionEnded)(void); @property (nonatomic, weak) id filtersDataSource; @property (nonatomic, weak) id toolsDataSource; @property (nonatomic, strong) UIImage *filterThumbnailImage; - (instancetype)initWithOrientation:(UIInterfaceOrientation)orientation cellWidth:(CGFloat)cellWidth; - (void)setMinimumLineSpacing:(CGFloat)minimumLineSpacing; - (void)setMinimumInteritemSpacing:(CGFloat)minimumInteritemSpacing; @end @protocol TGPhotoEditorCollectionViewFiltersDataSource - (NSInteger)numberOfFiltersInCollectionView:(TGPhotoEditorCollectionView *)collectionView; - (PGPhotoFilter *)collectionView:(TGPhotoEditorCollectionView *)collectionView filterAtIndex:(NSInteger)index; - (void)collectionView:(TGPhotoEditorCollectionView *)collectionView didSelectFilterWithIndex:(NSInteger)index; - (void)collectionView:(TGPhotoEditorCollectionView *)collectionView requestThumbnailImageForFilterAtIndex:(NSInteger)index completion:(void (^)(UIImage *thumbnailImage, bool cached, bool finished))completion; @end @protocol TGPhotoEditorCollectionViewToolsDataSource - (NSInteger)numberOfToolsInCollectionView:(TGPhotoEditorCollectionView *)collectionView; - (PGPhotoTool *)collectionView:(TGPhotoEditorCollectionView *)collectionView toolAtIndex:(NSInteger)index; - (void)collectionView:(TGPhotoEditorCollectionView *)collectionView didSelectToolWithIndex:(NSInteger)index; @end