Skip to content

Commit

Permalink
Merge branch 'hotfix/0.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaoj committed Sep 8, 2014
2 parents 5c6d555 + d350409 commit 92cb30d
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@
@implementation BSCollectionController (BSItemsModel)

- (void)didUpdateModel:(id<BSItemsModel>)aModel {
//Since we are assuming that it is the first section that needs to be reloaded, make sure that it actually exists!
if([self.collectionView numberOfSections] > 0) {
[self.collectionView performBatchUpdates:^{
[self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]
atScrollPosition:UICollectionViewScrollPositionTop
animated:YES];
} completion:nil];
}
[self.collectionView reloadData];
}

@end

0 comments on commit 92cb30d

Please sign in to comment.