ビューベースのnstableviewがあります。以下のコードを使用した条件に基づいて、行全体に色を付けたい
- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row
{
NSTableRowView *view = [[NSTableRowView alloc] initWithFrame:NSMakeRect(1, 1, 100, 50)];
[view setBackgroundColor:[NSColor redColor]];
return view;;
}
NSTableRowView
デリゲート メソッドが呼び出されますが、テーブルはデリゲート メソッドによって返されたものを使用していないようです。
ここでの主な目的は、いくつかの条件に基づいて行全体を色付けすることです。上記の実装で何が問題になっていますか?