2013-05-03 106 views

回答

2

背景以及選擇由NSTableRowView視圖處理。它可以(部分)被單元覆蓋,但這不是它應該如何。

實現自定義rowview並返回你需要畫

@interface MyRowView : NSTableRowView 

那裏排座椅後面使用您有:

  • drawBackgroundInRect:
  • drawDraggingDestinationFeedbackInRect:
  • drawSelectionInRect:
  • drawSeparatorInRect:

例如

@implementation MyRowView 

- (void)drawSelectionInRect:(NSRect)dirtyRect { 
     [currentFill fillRect:dirtyRect inContext:[[NSGraphicsContext currentContext]graphicsPort]]; 
} 

@end 

SRC:http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTableRowView_Class/Reference/Reference.html

+0

的示例使用CPTFill到BTW繪製填充 – 2013-05-04 07:57:07

+0

的OP要求NSTableCellView – 2014-09-24 15:34:21

+0

是和我說:「背景,以及選擇由NSTableRowView視圖處理它CAN(部分)被單元覆蓋,但這不是它應該如何。「 – 2014-09-24 15:35:24

相關問題