Browse Source

Update Tweak.xm

master
lint 5 years ago
parent
commit
748d4280ad
No account linked to committer's email address
1 changed files with 17 additions and 16 deletions
  1. +17
    -16
      Tweak.xm

+ 17
- 16
Tweak.xm View File

@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

Loading…
Cancel
Save