I create an NSCollectionView using cocoa binding.I find that when the NSMutableArray
,which is set as the NSCollectionView
's content , finish to sort,the NSCollectionView
has no change.
Here is my sort code:
-(void)updateOrder
{
[self willChangeValueForKey:@"bookmarksArray"];
[_bookmarksArray sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
/**
Here is the sort code.
**/
}];
[self didChangeValueForKey:@"bookmarksArray"];
}
I can catch the removed change and inserted change,but I can't catch the reorder change.Why?