mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-22 03:43:59 +08:00
Adding addObject: method to RKTableSection.
This commit is contained in:
committed by
Blake Watters
parent
f35f81ca0c
commit
f035af7a67
@@ -50,6 +50,7 @@
|
||||
+ (id)sectionForObjects:(NSArray *)objects withMappings:(RKTableViewCellMappings *)cellMappings;
|
||||
|
||||
- (id)objectAtIndex:(NSUInteger)rowIndex;
|
||||
- (void)addObject:(id)object;
|
||||
- (void)insertObject:(id)object atIndex:(NSUInteger)index;
|
||||
- (void)removeObjectAtIndex:(NSUInteger)index;
|
||||
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)object;
|
||||
|
||||
@@ -110,9 +110,14 @@
|
||||
return _tableController.tableView;
|
||||
}
|
||||
|
||||
- (void)addObject:(id)object
|
||||
{
|
||||
return [self insertObject:object atIndex:[_objects count]];
|
||||
}
|
||||
|
||||
- (void)insertObject:(id)object atIndex:(NSUInteger)index
|
||||
{
|
||||
[(NSMutableArray *)_objects insertObject:object atIndex:index];
|
||||
[(NSMutableArray*)_objects insertObject:object atIndex:index];
|
||||
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index
|
||||
inSection:[_tableController indexForSection:self]];
|
||||
|
||||
Reference in New Issue
Block a user