Update manual and version numbers.
[enjoyable.git] / Categories / NSMutableArray+MoveObject.h
1 //
2 // NSMutableArray+MoveObject.h
3 // Enjoyable
4 //
5 // Created by Joe Wreschnig on 3/7/13.
6 //
7 //
8
9 #import <Foundation/Foundation.h>
10
11 @interface NSMutableArray (MoveObject)
12
13 - (void)moveObjectAtIndex:(NSUInteger)src toIndex:(NSUInteger)dst;
14 // Move the object at index src to (post-move) index dst. Other
15 // objects shift up or down as necessary to make room, as in
16 // insertObject:atIndex:.
17
18 - (BOOL)moveFirstwards:(id)object upTo:(NSUInteger)minIndex;
19 - (BOOL)moveLastwards:(id)object upTo:(NSUInteger)maxIndex;
20 // Move an object one step towards the first or last position in
21 // the array, up to a minimum or maximum index. Returns YES if the
22 // array changed; NO if the object was not in the array or was
23 // already at the minimum/maximum index.
24
25 - (BOOL)moveFirstwards:(id)object;
26 - (BOOL)moveLastwards:(id)object;
27 // Move an object towards the first or last position in the array.
28 // Returns YES if the array changed; NO if the object was not in
29 // the array or if the object was already in the first/last
30 // position.
31
32
33 @end