行の展開/折りたたみ時に NSOutlineView で使用されるカスタム NSTableRowView の外観を変更しようとしています。私の NSOutlineViewDelegate には以下が含まれます:
- (NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item
{
...
return rowView;
}
- (void)itemDidExpand:(NSNotification *)notification
{
NSDictionary *userInfo = [notification userInfo];
id item = [userInfo objectForKey:@"NSObject"];
NSOutlineView *outlineView = [notification object];
[outlineView reloadItem:item];
}
残念ながら、これはカスタム行ビューをリロードしません。
NSOutlineView 全体のデータをリロードすると、次のように機能します。
- (void)itemDidExpand:(NSNotification *)notification
{
[outlineView reloadData];
}
しかし、大量のデータの場合、これには時間がかかる可能性があり、多くの場合、ビーチ ボールが回転します。
単一の最上位アイテムのカスタム行ビューをリロードすることはできますか?