// // NSMutableArray+convenience.m // // Created by in 't Veen Tjeerd on 5/10/12. // Copyright (c) 2012 Vurig Media. All rights reserved. // #import "NSMutableArray+convenience.h" @implementation NSMutableArray (Convenience) - (void)moveObjectFromIndex:(NSUInteger)from toIndex:(NSUInteger)to { if (to != from) { id obj = [self objectAtIndex:from]; [self removeObjectAtIndex:from]; if (to >= [self count]) { [self addObject:obj]; } else { [self insertObject:obj atIndex:to]; } } } @end