Skip to content

Commit

Permalink
Fix AssetsViewController not scrolling to bottom
Browse files Browse the repository at this point in the history
ステータスバーがテザリング中などで太くなってる状態の時に
アルバムを開くと一番下にスクロールされていない不具合を修正.

ref: nek023#150
  • Loading branch information
mironal committed May 20, 2016
1 parent 51396e2 commit 002bb65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion QBImagePicker/QBAssetsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ - (void)viewWillAppear:(BOOL)animated
// Scroll to bottom
if (self.fetchResult.count > 0 && self.isMovingToParentViewController && !self.disableScrollToBottom) {
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:(self.fetchResult.count - 1) inSection:0];
[self.collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionTop animated:NO];
dispatch_async(dispatch_get_main_queue(), ^{

[self.collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionTop animated:NO];
});
}
}

Expand Down

0 comments on commit 002bb65

Please sign in to comment.