- #import <QuartzCore/QuartzCore.h>
- CAGradientLayer *gradient = [CAGradientLayer layer];
- gradient.frame = rect;
- gradient.colors = [NSArray arrayWithObjects:(id)[UIColor blackColor].CGColor,
- (id)[UIColor grayColor].CGColor,
- (id)[UIColor blackColor].CGColor,nil];
- [self.layer insertSublayer:gradient atIndex:0];
//一个section刷新
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
[tableview reloadSections:indexSetwithRowAnimation:UITableViewRowAnimationA
utomatic];
//一个cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArrayarrayWithObjects:indexPath,nil]withRowAnimation:UITableViewRowAnimationN
one];