Skip to content

Instantly share code, notes, and snippets.

View harrisg's full-sized avatar

Greg Harris harrisg

View GitHub Profile
@harrisg
harrisg / NSTableView+Reordering.m
Created January 27, 2016 15:32 — forked from zpasternack/NSTableView+Reordering.m
Category on NSTableView for animating rows, using old and new sorted arrays as input. Updated to support items having been removed or added.
@implementation NSTableView (Reordering)
- (void) moveRowsWithOldObjects:(NSArray*)oldObjects newObjects:(NSArray*)newObjects
{
NSMutableArray* oldSortedArray = [oldObjects mutableCopy];
NSArray* newSortedArray = newObjects;
[self beginUpdates];