|
|
|
|
|
|
|
|
|
|
|
|
|
|
@interface PUCollectionView : UICollectionView
|
|
|
@interface PUCollectionView : UICollectionView
|
|
|
@property(assign,nonatomic) id delegate; |
|
|
|
|
|
|
|
|
@property(assign,nonatomic) id delegate;
|
|
|
@property(assign,nonatomic) NSArray* visibleCells;
|
|
|
@property(assign,nonatomic) NSArray* visibleCells;
|
|
|
@property(assign,nonatomic) NSArray* indexPathsForVisibleItems;
|
|
|
@property(assign,nonatomic) NSArray* indexPathsForVisibleItems;
|
|
|
@property(assign,nonatomic) id reorderDelegate;
|
|
|
@property(assign,nonatomic) id reorderDelegate;
|
|
|
@property(assign,nonatomic) id selectionDelegate;
|
|
|
@property(assign,nonatomic) id selectionDelegate;
|
|
|
-(id) idexPathForItemAtPoint:(id) arg1;
|
|
|
-(id) idexPathForItemAtPoint:(id) arg1;
|
|
|
-(id) cellForItemAtIndexPath:(id) arg1; |
|
|
|
|
|
|
|
|
-(id) cellForItemAtIndexPath:(id) arg1;
|
|
|
-(id) indexPathForCell:(id) arg1;
|
|
|
-(id) indexPathForCell:(id) arg1;
|
|
|
-(void) _updateVisibleCellsNow:(BOOL) arg1; |
|
|
|
|
|
|
|
|
-(void) _updateVisibleCellsNow:(BOOL) arg1;
|
|
|
|
|
|
|
|
|
@end
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(void)updateCtrlButton;
|
|
|
-(void)updateCtrlButton;
|
|
|
|
|
|
|
|
|
@end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@interface PUPhotosGridCell : UIView
|
|
|
@interface PUPhotosGridCell : UIView
|
|
|
@property(assign, nonatomic) id photoContentView;
|
|
|
@property(assign, nonatomic) id photoContentView;
|
|
|
-(void) prepareForReuse;
|
|
|
-(void) prepareForReuse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
} else {
|
|
|
|
|
|
|
|
|
//PUPhotosGridCell* firstSelectedCell = [self cellForItemAtIndexPath:[gvController ctrlFirstIndexPath]];
|
|
|
|
|
|
|
|
|
PUPhotosGridCell* firstSelectedCell = [self cellForItemAtIndexPath:[gvController ctrlFirstIndexPath]];
|
|
|
|
|
|
|
|
|
//[firstSelectedCell.ctrlSelectOverlayView removeFromSuperview];
|
|
|
|
|
|
//firstSelectedCell.ctrlSelectOverlayView = nil;
|
|
|
|
|
|
|
|
|
[firstSelectedCell.ctrlSelectOverlayView removeFromSuperview];
|
|
|
|
|
|
firstSelectedCell.ctrlSelectOverlayView = nil;
|
|
|
|
|
|
|
|
|
NSRange indexRange;
|
|
|
NSRange indexRange;
|
|
|
NSInteger firstRow = [gvController ctrlFirstIndexPath].row;
|
|
|
NSInteger firstRow = [gvController ctrlFirstIndexPath].row;
|
|
|
NSInteger firstSection = [gvController ctrlFirstIndexPath].section;
|
|
|
NSInteger firstSection = [gvController ctrlFirstIndexPath].section;
|
|
|
NSInteger nextRow = nextIndexPath.row;
|
|
|
NSInteger nextRow = nextIndexPath.row;
|
|
|
NSInteger nextSection = nextIndexPath.section;
|
|
|
NSInteger nextSection = nextIndexPath.section;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSInteger lowRow = 0;
|
|
|
NSInteger lowRow = 0;
|
|
|
NSInteger highRow = 0;
|
|
|
NSInteger highRow = 0;
|
|
|
NSInteger lowSection = 0;
|
|
|
NSInteger lowSection = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[gvController updateCtrlButton];
|
|
|
[gvController updateCtrlButton];
|
|
|
}
|
|
|
}
|
|
|
} |
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(id) dequeueReusableCellWithReuseIdentifier: (id) arg1 forIndexPath:(id) arg2{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(id) dequeueReusableCellWithReuseIdentifier: (id) arg1 forIndexPath:(id) arg2{
|
|
|
id orig = %orig;
|
|
|
id orig = %orig;
|
|
|
|
|
|
|
|
|
if ([self selectionDelegate] && ![self reorderDelegate] && [orig isKindOfClass:[%c(PUPhotosGridCell) class]]) { |
|
|
|
|
|
|
|
|
if ([self selectionDelegate] && ![self reorderDelegate] && [orig isKindOfClass:[%c(PUPhotosGridCell) class]]) {
|
|
|
|
|
|
|
|
|
id gvController = [self delegate];
|
|
|
id gvController = [self delegate];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSIndexPath* firstIndexPath = [gvController ctrlFirstIndexPath];
|
|
|
NSIndexPath* firstIndexPath = [gvController ctrlFirstIndexPath];
|
|
|
NSIndexPath* thisIndexPath = arg2;
|
|
|
NSIndexPath* thisIndexPath = arg2;
|
|
|
|
|
|
|
|
|
HBLogDebug(@"firstIndexPath: %ld-%ld thisIndexPath: %ld-%ld", (long)firstIndexPath.section, (long)firstIndexPath.row, (long)thisIndexPath.section, (long)thisIndexPath.row);
|
|
|
|
|
|
|
|
|
HBLogDebug(@"firstIndexPath: %ld-%ld thisIndexPath: %ld-%ld", (long)firstIndexPath.section, (long)firstIndexPath.row, (long)thisIndexPath.section, (long)thisIndexPath.row);
|
|
|
|
|
|
|
|
|
if ( firstIndexPath.section == thisIndexPath.section && firstIndexPath.row == thisIndexPath.row){
|
|
|
if ( firstIndexPath.section == thisIndexPath.section && firstIndexPath.row == thisIndexPath.row){
|
|
|
|
|
|
|
|
|
[orig ctrlSelectOverlayView].image = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/PhotoCtrl/check.png"];
|
|
|
[orig ctrlSelectOverlayView].image = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/PhotoCtrl/check.png"];
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
return orig; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return orig;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
%end
|
|
|
%end
|
|
|
|
|
|
|