Permalink
Browse files

Reformat last animation view changes to now warn on overridden variables

  • Loading branch information...
1 parent 7b25ab1 commit ce067baeb44fb4056906802d12670f53d8ba9b9b @steipete committed Mar 21, 2013
Showing with 3 additions and 11 deletions.
  1. +3 −11 PSTCollectionView/PSTCollectionView.m
@@ -1755,28 +1755,20 @@ - (void)updateWithItems:(NSArray *)items {
// to call _updateCompletionHandler with that flag.
// Ideally, _updateCompletionHandler should be called along with the other logic in
// CATransaction's completionHandler but I simply don't know where to get that flag.
-
[CATransaction setCompletionBlock:^{
// Iterate through all the views that we are going to remove.
-
- [viewsToRemove enumerateKeysAndObjectsUsingBlock:^(NSNumber *keyObj, NSArray *array, BOOL *stop) {
-
+ [viewsToRemove enumerateKeysAndObjectsUsingBlock:^(NSNumber *keyObj, NSArray *views, BOOL *stop) {
PSTCollectionViewItemType type = [keyObj unsignedIntegerValue];
-
- [array enumerateObjectsUsingBlock:^(id view, NSUInteger idx, BOOL *stop) {
-
+ for (PSTCollectionReusableView *view in views) {
if(type == PSTCollectionViewItemTypeCell) {
[self reuseCell:(PSTCollectionViewCell *)view];
} else if (type == PSTCollectionViewItemTypeSupplementaryView) {
[self reuseSupplementaryView:view];
} else if (type == PSTCollectionViewItemTypeDecorationView) {
[self reuseDecorationView:view];
}
-
- }];
-
+ }
}];
-
_collectionViewFlags.updatingLayout = NO;
}];

0 comments on commit ce067ba

Please sign in to comment.