これは私のテーブルビューデリゲートです:
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
id theRecord;
NSMutableString *gid;
theRecord = [tableDataSource objectAtIndex:row];
gid = [theRecord objectForKey:@"gid"];
if (([gid intValue] % 2) != 0)
{
[aCell setDrawsBackground: YES];
[aCell setBackgroundColor: [NSColor colorWithCalibratedRed: 237.0 / 255.0
green: 243.0 / 255.0
blue: 254.0 / 255.0
alpha: 1.0]];
}
else
{
[aCell setDrawsBackground: NO];
}
}
通常のセルを表示することは問題なく機能しますが、NSButtonCellタイプ(チェックボックス用)のセルを追加すると、テーブルビューがフリーズします。それを修正する方法は?
どんな助けでもいただければ幸いです。