mirror of
https://github.com/lint/PhotoCtrl
synced 2025-07-06 20:26:48 +00:00
Update Tweak.xm
This commit is contained in:
33
Tweak.xm
33
Tweak.xm
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
@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
|
||||||
|
|
||||||
@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
-(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;
|
||||||
@ -154,17 +154,17 @@
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//PUPhotosGridCell* firstSelectedCell = [self cellForItemAtIndexPath:[gvController ctrlFirstIndexPath]];
|
PUPhotosGridCell* firstSelectedCell = [self cellForItemAtIndexPath:[gvController ctrlFirstIndexPath]];
|
||||||
|
|
||||||
//[firstSelectedCell.ctrlSelectOverlayView removeFromSuperview];
|
[firstSelectedCell.ctrlSelectOverlayView removeFromSuperview];
|
||||||
//firstSelectedCell.ctrlSelectOverlayView = nil;
|
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;
|
||||||
@ -230,13 +230,13 @@
|
|||||||
|
|
||||||
[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];
|
||||||
|
|
||||||
@ -249,7 +249,8 @@
|
|||||||
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"];
|
||||||
@ -259,8 +260,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return orig;
|
||||||
return orig;
|
}
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user