Change highlighting color in NSTableView in Cocoa?

后端 未结 3 514
既然无缘
既然无缘 2021-01-31 21:09

I am developing a Cocoa application and encountered a problem with highlighting. Standard highlighting color in MAC OS X applications is blue, but it doesn\'t suit my app, since

3条回答
  •  执念已碎
    2021-01-31 21:50

    - (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView
    {
    
        if ([self isHighlighted])
        {
            NSRect bgFrame = frame;
            [[NSColor redColor] set];  
            NSRectFill(bgFrame);
    
        }
    }
    

    I use this code to deal with the height, the code is in my custom cell file

提交回复
热议问题