使用此方法:
+ (id)indexPathWithIndexes:(const NSUInteger [])indexes length:(NSUInteger)length;
前任 :
NSIndexPath *indexPath = [NSIndexPath indexPathWithIndexes:HERE_PASS_INDEXES length:HERE_PASS_LENGTH];
[your_table reloadRowsAtIndexPaths:indexPath withRowAnimation:UITableViewRowAnimationLeft];
或用作:
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
// Make the index paths //
NSIndexPath* indexPath1 = [NSIndexPath indexPathForRow:1 inSection:1];
NSIndexPath* indexPath2 = [NSIndexPath indexPathForRow:2 inSection:1];
NSIndexPath* indexPath3 = [NSIndexPath indexPathForRow:3 inSection:2];
NSIndexPath* indexPath4 = [NSIndexPath indexPathForRow:5 inSection:2];
// Add them in an index path array
NSArray* indexArray = [NSArray arrayWithObjects:indexPath1, indexPath2,indexPath3,indexPath4, nil];
[your_tablename reloadRowsAtIndexPaths:indexArray withRowAnimation:UITableViewRowAnimationFade];