2011-07-13 17 views
0

に透明ではない私は、テーブルビュー.MYテーブルをリロード私のtableView &に新しい行を追加していクリックし、私は以下のコードに編集モードのセルは、ボタン上のMacアプリ

[tempArray addObject:@""]; 
[tableView reloadData]; 
[tableView editColumn:0 row:[tempArray count]-1 withEvent:nil select:YES]; 
[tableView setNextResponder:self]; 

-(void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex 
{ 
    [cell setFocusRingType:NSFocusRingTypeNone]; 
    [cell setBackgroundColor:[NSColor clearColor]]; 

    if([[tableColumn identifier] isEqualToString:@"DataIdentifier"]) 
    { 
     [cell setDrawsBackground:NO]; 
     [cell setTextColor:[NSColor grayColor]]; 
     [cell setFont:[NSFont fontWithName:appDelegate.selectedFont size:appDelegate.selectedFontSize]]; // somewhat like 16 on the pad  
    } 
} 
を使用していますNSTextFieldセル&を持っています

編集モードでセルが透明ではありません。白い背景があります。助けてください!

答えて

0

NSTextFieldCellの背景色をテーブルビューの背景色と同じに設定してみてください。

このメソッドを使用するsetBackgroundColor:

関連する問題