Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
修复issue 4
  • Loading branch information
tianliangyihou committed Nov 22, 2017
1 parent b6864f0 commit 9ae3701
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion test/LBPhotoBrowser/LBPhotoBrowserShowHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

static inline int lb_currentSelectImageViewIndex() {
UICollectionView *currentCollectionView = [LBPhotoBrowserManager defaultManager].currentCollectionView;
return (int)(currentCollectionView.contentOffset.x / SCREEN_WIDTH);
return (int)(currentCollectionView.contentOffset.x / currentCollectionView.width);

}

Expand Down
2 changes: 1 addition & 1 deletion test/LBPhotoBrowser/LBPhotoBrowserView.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
@interface LBPhotoBrowserView : UIView

- (void)showImageViewsWithURLs:(LBUrlsMutableArray *)urls andSelectedIndex:(int)index;
- (void)showImageWithURLArray:(NSArray *)urls fromCollectionView:(UICollectionView *)collectionView selectedIndex:(int)index;
- (void)showImageWithURLArray:(LBUrlsMutableArray *)urls fromCollectionView:(UICollectionView *)collectionView selectedIndex:(int)index;
@end

2 changes: 1 addition & 1 deletion test/LBPhotoBrowser/LBPhotoBrowserView.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ - (void)showImageViewsWithURLs:(LBUrlsMutableArray *)urls andSelectedIndex:(int)
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:index inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
}

- (void)showImageWithURLArray:(NSArray *)urls fromCollectionView:(UICollectionView *)collectionView selectedIndex:(int)index {
- (void)showImageWithURLArray:(LBUrlsMutableArray *)urls fromCollectionView:(UICollectionView *)collectionView selectedIndex:(int)index {
[self showImageViewsWithURLs:urls andSelectedIndex:index];
}

Expand Down

0 comments on commit 9ae3701

Please sign in to comment.