Permalink
Browse files

use modern objc syntax

  • Loading branch information...
steipete committed Mar 1, 2013
1 parent 3440837 commit 38d0ae5cfd3733087c31b49bcbd8242f09884665
Showing with 3 additions and 3 deletions.
  1. +3 −3 PSTCollectionView/PSTCollectionView.m
@@ -1050,7 +1050,7 @@ - (void)setCollectionViewLayout:(PSTCollectionViewLayout *)layout animated:(BOOL
if (!centerItemIndexPath) {
NSArray *visibleItems = [self indexPathsForVisibleItems];
if (visibleItems.count > 0) {
- centerItemIndexPath = [visibleItems objectAtIndex:visibleItems.count / 2];
+ centerItemIndexPath = visibleItems[visibleItems.count / 2];
}
}
@@ -1627,8 +1627,8 @@ - (void)updateWithItems:(NSArray *)items {
}
NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:@{@"view":view}];
- if (startAttrs) [dic setObject:startAttrs forKey:@"previousLayoutInfos"];
- if (finalAttrs) [dic setObject:finalAttrs forKey:@"newLayoutInfos"];
+ if (startAttrs) dic[@"previousLayoutInfos"] = startAttrs;
+ if (finalAttrs) dic[@"newLayoutInfos"] = finalAttrs;
[animations addObject:dic];
PSTCollectionViewItemKey* newKey = [key copy];

0 comments on commit 38d0ae5

Please sign in to comment.