无法使NSProgressIndicator具有透明的背景,无论如何它都显示为灰色背景:
有什么想法吗?
let progressbar = NSProgressIndicator.init(frame: NSRect(x: 10, y: y+4, width: 60, height: 60))
progressbar.style = NSProgressIndicatorStyle.SpinningStyle
progressbar.controlTint = NSControlTint.ClearControlTint
progressbar.wantsLayer = true
progressbar.layer?.backgroundColor = NSColor.clearColor().CGColor
self.contentView.addSubview(progressbar)
有什么想法吗?