Created
August 31, 2013 06:31
-
-
Save tony0x59/6396571 to your computer and use it in GitHub Desktop.
tableview重载数据时的淡入淡出动画过渡效果
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UITableView+reloadDataAnimated.h" | |
@implementation UITableView (reloadDataAnimated) | |
- (void)reloadDataWithAnimated:(BOOL)animated | |
{ | |
[self reloadData]; | |
if (animated) { | |
CATransition *animation = [CATransition animation]; | |
[animation setType:kCATransitionFade]; | |
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]]; | |
[animation setDuration:0.3]; | |
[[self layer] addAnimation:animation forKey:@"UITableViewReloadDataAnimationKey"]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个动画不需要移除么?