Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Commit

Permalink
Added property for changing row update animation.
Browse files Browse the repository at this point in the history
Defaults to UITableViewRowAnimationFade.
  • Loading branch information
baz committed Aug 25, 2011
1 parent 9beaa2a commit bf41a1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions SSToolkit/SSCollectionView.h
Expand Up @@ -63,6 +63,7 @@ typedef enum {
id<SSCollectionViewDataSource> _dataSource;

SSCollectionViewExtremitiesStyle _extremitiesStyle;
UITableViewRowAnimation _rowUpdateAnimation;
CGFloat _minimumColumnSpacing;
CGFloat _rowSpacing;
BOOL _allowsSelection;
Expand Down Expand Up @@ -93,6 +94,11 @@ typedef enum {
*/
@property (nonatomic, assign) SSCollectionViewExtremitiesStyle extremitiesStyle;

/**
The animation to use when updating rows.
*/
@property (nonatomic, assign) UITableViewRowAnimation rowUpdateAnimation;

/**
The minimum column spacing.
Expand Down
3 changes: 2 additions & 1 deletion SSToolkit/SSCollectionView.m
Expand Up @@ -77,6 +77,7 @@ - (void)setDelegate:(id<SSCollectionViewDelegate>)delegate {
@synthesize minimumColumnSpacing = _minimumColumnSpacing;
@synthesize rowSpacing = _rowSpacing;
@synthesize allowsSelection = _allowsSelection;
@synthesize rowUpdateAnimation = _rowUpdateAnimation;

- (UIScrollView *)scrollView {
return _tableView;
Expand Down Expand Up @@ -272,7 +273,7 @@ - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths {
[rowIndexPaths addObject:rowIndexPath];
}
}];
[_tableView reloadRowsAtIndexPaths:rowIndexPaths withRowAnimation:UITableViewRowAnimationFade];
[_tableView reloadRowsAtIndexPaths:rowIndexPaths withRowAnimation:_rowUpdateAnimation];
[rowIndexPaths release];
}

Expand Down

0 comments on commit bf41a1e

Please sign in to comment.