Add website source.
[enjoyable.git] / Categories / NSMutableArray+MoveObject.m
1 //
2 // NSMutableArray+MoveObject.m
3 // Enjoyable
4 //
5 // Created by Joe Wreschnig on 3/7/13.
6 //
7 //
8
9 #import "NSMutableArray+MoveObject.h"
10
11 @implementation NSMutableArray (MoveObject)
12
13 - (void)moveObjectAtIndex:(NSUInteger)src toIndex:(NSUInteger)dst {
14 id obj = self[src];
15 [self removeObjectAtIndex:src];
16 [self insertObject:obj atIndex:dst > src ? dst - 1 : dst];
17 }
18
19 @end