首页
学习
活动
专区
工具
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
页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

6分33秒

048.go的空接口

2分39秒

【蓝鲸智云】如何使用主机监控

3分5秒

【蓝鲸智云】监控告警是如何产生的以及如何配置监控策略

2分17秒

【蓝鲸智云】如何使用数据检索

1分48秒

【蓝鲸智云】如何使用脚本插件上报业务数据

2分37秒

【蓝鲸智云】如何在监控平台进行自定义上报

2分0秒

【蓝鲸智云】如何在监控平台使用服务拨测

1分5秒

BOSHIDA DC电源模块在医疗设备中应用

1分2秒

DC电源模块在仪器仪表中应用

42秒

DC电源模块是否需要具有温度保护功能

1分7秒

DC电源模块在工业自动化的应用

58秒

DC电源模块在通信仪器中的应用

领券