forked from BigShow1949/BigShow1949
-
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
1 parent
1456d7e
commit 8bbf3b3
Showing
41 changed files
with
1,327 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+5.19 KB
(100%)
...xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
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
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...949/Classes/10 - UIKit/UICollectionView/RACollectionViewController/RACollectionViewCell.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,15 @@ | ||
// | ||
// RACollectionViewCell.h | ||
// RACollectionViewTripletLayout-Demo | ||
// | ||
// Created by Ryo Aoyama on 5/27/14. | ||
// Copyright (c) 2014 Ryo Aoyama. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface RACollectionViewCell : UICollectionViewCell | ||
|
||
@property (nonatomic, strong) UIImageView *imageView; | ||
|
||
@end |
39 changes: 39 additions & 0 deletions
39
...949/Classes/10 - UIKit/UICollectionView/RACollectionViewController/RACollectionViewCell.m
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,39 @@ | ||
// | ||
// RACollectionViewCell.m | ||
// RACollectionViewTripletLayout-Demo | ||
// | ||
// Created by Ryo Aoyama on 5/27/14. | ||
// Copyright (c) 2014 Ryo Aoyama. All rights reserved. | ||
// | ||
|
||
#import "RACollectionViewCell.h" | ||
|
||
@implementation RACollectionViewCell | ||
|
||
- (instancetype)initWithCoder:(NSCoder *)coder | ||
{ | ||
self = [super initWithCoder:coder]; | ||
if (self) { | ||
_imageView = [[UIImageView alloc] init]; | ||
_imageView.contentMode = UIViewContentModeScaleAspectFill; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)setBounds:(CGRect)bounds | ||
{ | ||
[super setBounds:bounds]; | ||
self.imageView.frame = bounds; | ||
} | ||
|
||
- (void)setHighlighted:(BOOL)highlighted | ||
{ | ||
[super setHighlighted:highlighted]; | ||
if (highlighted) { | ||
_imageView.alpha = .7f; | ||
}else { | ||
_imageView.alpha = 1.f; | ||
} | ||
} | ||
|
||
@end |
47 changes: 47 additions & 0 deletions
47
...it/UICollectionView/RACollectionViewController/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,47 @@ | ||
// | ||
// 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 <RACollectionViewTripletLayoutDatasource> | ||
|
||
@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 | ||
|
||
- (CGFloat)reorderingItemAlpha:(UICollectionView * )collectionview; //Default 0. | ||
- (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, weak) id<RACollectionViewDelegateReorderableTripletLayout> delegate; | ||
@property (nonatomic, weak) id<RACollectionViewReorderableTripletLayoutDataSource> datasource; | ||
@property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGesture; | ||
@property (nonatomic, strong, readonly) UIPanGestureRecognizer *panGesture; | ||
|
||
@end |
Oops, something went wrong.