forked from ra1028/RACollectionViewReorderableTripletLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ryo Aoyama
authored and
Ryo Aoyama
committed
May 31, 2014
0 parents
commit ed5700d
Showing
26 changed files
with
1,722 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
46 changes: 46 additions & 0 deletions
46
RACollectionReorderableViewTripletLayout/RACollectionViewReorderableTripletLayout.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// RACollectionViewReorderableTripletLayout.h | ||
// RACollectionViewTripletLayout-Demo | ||
// | ||
// Created by Ryo Aoyama on 5/27/14. | ||
// Copyright (c) 2014 Ryo Aoyama. All rights reserved. | ||
// | ||
|
||
#import "RACollectionViewTripletLayout.h" | ||
|
||
@protocol RACollectionViewReorderableTripletLayoutDataSource <UICollectionViewDataSource> | ||
|
||
@optional | ||
|
||
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(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; | ||
|
||
@end | ||
|
||
@protocol RACollectionViewDelegateReorderableTripletLayout <RACollectionViewDelegateTripletLayout> | ||
|
||
@optional | ||
|
||
- (UIEdgeInsets)autoScrollTrigerEdgeInsets:(UICollectionView *)collectionView; //Sorry, has not supported horizontal scroll. | ||
- (UIEdgeInsets)autoScrollTrigerPadding:(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 | ||
|
||
|
||
|
||
@interface RACollectionViewReorderableTripletLayout : RACollectionViewTripletLayout <UIGestureRecognizerDelegate> | ||
|
||
@property (nonatomic, assign) id<RACollectionViewDelegateReorderableTripletLayout> delegate; | ||
@property (nonatomic, assign) id<RACollectionViewReorderableTripletLayoutDataSource> datasource; | ||
@property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGesture; | ||
@property (nonatomic, strong, readonly) UIPanGestureRecognizer *panGesture; | ||
|
||
@end |
Oops, something went wrong.