GeezerVison is showing github.com — 0.1.5 · FPJack/FPImageVideoCell@fd5fda8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: FPImageVideoCell.podspec +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
8 | 8 |
|
9 | 9 | Pod::Spec.new do |s| |
10 | 10 | s.name = 'FPImageVideoCell' |
11 | | - s.version = '0.1.4' |
| 11 | + s.version = '0.1.5' |
12 | 12 | s.summary = 'A short description of FPImageVideoCell.' |
13 | 13 |
|
14 | 14 | # This description is used to generate tags and improve search results. |
|
Collapse file
Copy file name to clipboardExpand all lines: FPImageVideoCell/Classes/FPImageVideoCell.m +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -473,6 +473,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa |
473 | 473 | self.tapImageBlock(self.source[indexPath.item], [collectionView cellForItemAtIndexPath:indexPath]); |
474 | 474 | }else{ |
475 | 475 | NSMutableArray *images = [NSMutableArray array]; |
| 476 | + __block NSInteger currentPage = 0; |
476 | 477 | [self.source enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { |
477 | 478 | if (![obj isKindOfClass:[FPVideoItem class]]) { |
478 | 479 | YBIBImageData *data = [YBIBImageData new]; |
@@ -482,12 +483,13 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa |
482 | 483 | data.imageURL = [NSURL URLWithString:obj]; |
483 | 484 | } |
484 | 485 | data.projectiveView = [collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:idx inSection:0]]; |
| 486 | + if (idx == indexPath.item) currentPage = images.count; |
485 | 487 | [images addObject:data]; |
486 | 488 | } |
487 | 489 | }]; |
488 | 490 | YBImageBrowser *browser = [YBImageBrowser new]; |
489 | 491 | browser.dataSourceArray = images; |
490 | | - browser.currentPage = indexPath.item; |
| 492 | + browser.currentPage = currentPage; |
491 | 493 | [browser show]; |
492 | 494 | } |
493 | 495 | } |
|