Como você arrastar e mover uma linha no NSTableView?

Se fosse umiOS projeto, deixando o usuário arrastar-mover a linha selecionada seria relativamente fácil. Eu acho que é algo como

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
    return UITableViewCellEditingStyleNone;
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    return YES;
}

- (BOOL)tableView:(UITableView *)tableview canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    return YES;
}

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
    // ...
}

Como você faz isso comNSTableView (não UITableView no iOS) emMac OS se eu tiver umbaseado em células mesa? Um projeto de exemplo da Apple, Inc. que permite ao usuário arrastar itens énavegador de imagens, o que não ajuda muito, porque não envolve um controle NSTableView. Você usacanDragRowsWithIndexes:no ponto? Não consigo muitos hits de pesquisa com canDragRowsWithIndexes. Se eu executar uma pesquisa por "reordenar do NSTableView", recebo ocorrências para classificar os itens da tabela.

Obrigado pelo seu conselho.

questionAnswers(1)

yourAnswerToTheQuestion