NSTextField in NSTableCellView

前端 未结 4 1993
面向向阳花
面向向阳花 2021-01-01 03:20

I have a view based NSTableView with a custom NSTableCellView. This custom NSTableCellView has several labels (NSTextField). The whole UI of the NSTableCellView is built in

4条回答
  •  遥遥无期
    2021-01-01 03:53

    Swift 4

     override var backgroundStyle: NSView.BackgroundStyle {
         get {
            return super.backgroundStyle
         }
         set {
            self.yourCustomLabel.textColor = NSColor(calibratedWhite: 0.0, alpha: 1.0)//black
         }
     }
    

提交回复
热议问题