首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

NSProgressIndicator在绘制的条形图中具有不同的颜色

作为一个云计算领域的专家,我可以为您提供关于NSProgressIndicator在绘制的条形图中具有不同的颜色的详细信息。

首先,NSProgressIndicator是一个用于显示进度的控件,它可以在应用程序中显示一个不确定的进度指示器。在macOS中,它通常显示为一个旋转的圆环。

在绘制的条形图中具有不同的颜色,可以通过使用NSProgressIndicator的子类NSLevelIndicator来实现。NSLevelIndicator是一个可以显示水平或垂直条形图的控件,它可以设置不同的颜色来表示不同的进度范围。

以下是如何使用NSLevelIndicator来实现不同颜色的示例代码:

代码语言:swift
复制
let levelIndicator = NSLevelIndicator()
levelIndicator.minValue = 0
levelIndicator.maxValue = 100
levelIndicator.warningValue = 50
levelIndicator.criticalValue = 80
levelIndicator.isEditable = false
levelIndicator.levelIndicatorStyle = .continuous
levelIndicator.numberOfTickMarks = 0
levelIndicator.cell?.backgroundColor = .clear
levelIndicator.cell?.controlTint = .graphiteControlTint
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.trackFillColor = .clear
levelIndicator.cell?.knobFillColor = .clear
levelIndicator.cell?.knobColor = .clear
levelIndicator.cell?.knobFillColor = .clear
levelIndicator.cell?.secondaryKnobFillColor = .clear
levelIndicator.cell?.backgroundColor = .clear
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
levelIndicator.cell?.isOpaque = false
levelIndicator.cell?.isEnabled = true
levelIndicator.cell?.controlSize = .smallControlSize
levelIndicator.cell?.controlView = levelIndicator
页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

领券