我NSTableColumn使用sort descriptors. 我将以下代码用于Sorting.
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"Column3" ascending:NO];
NSArray *sortDescriptors= [NSArray arrayWithObject:sortDescriptor];
[self.dataArray sortUsingDescriptors:sortDescriptors];
[tableView setIndicatorImage:[NSImage imageNamed:@"NSAscendingSortIndicator"]
inTableColumn:[tableView tableColumnWithIdentifier:@"Column3"]];
我可以从中获取图像[NSImage imageNamed:@"NSAscendingSortIndicator"],但我无法在 tableview 标题中查看图像。
有什么方法可以模拟mouse click在.table columnSort indicatortable column