2014-07-10 16:11:09 +02:00
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
@interface TGCollectionMenuLayout : UICollectionViewFlowLayout
|
|
|
|
|
|
|
|
@property (nonatomic) bool withoutAnimation;
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@property (assign, nonatomic) CGFloat scrollingSpeed;
|
|
|
|
@property (assign, nonatomic) UIEdgeInsets scrollingTriggerEdgeInsets;
|
|
|
|
@property (strong, nonatomic, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer;
|
|
|
|
@property (strong, nonatomic, readonly) UIPanGestureRecognizer *panGestureRecognizer;
|
|
|
|
|
|
|
|
@property (strong, nonatomic) NSIndexPath *selectedItemIndexPath;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol TGCollectionMenuLayoutDataSource <UICollectionViewDataSource>
|
|
|
|
|
|
|
|
@optional
|
|
|
|
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willBeginMovingToIndexPath:(NSIndexPath *)toIndexPath;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath didMoveToIndexPath:(NSIndexPath *)toIndexPath;
|
|
|
|
|
|
|
|
- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath canMoveToIndexPath:(NSIndexPath *)toIndexPath;
|
|
|
|
|
2014-07-10 16:11:09 +02:00
|
|
|
@end
|
2015-10-01 18:19:52 +02:00
|
|
|
|
|
|
|
@protocol TGCollectionMenuLayoutDelegateFlowLayout <UICollectionViewDelegateFlowLayout>
|
|
|
|
@optional
|
|
|
|
|
|
|
|
- (BOOL)collectionViewCanMoveItems:(UICollectionView *)collectionView;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout willBeginDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout didBeginDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout willEndDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout didEndDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
|
|
|
|
@end
|