diff --git a/ChartsDemo-macOS/PlaygroundChart.playground/Pages/BubbleChart.xcplaygroundpage/Contents.swift b/ChartsDemo-macOS/PlaygroundChart.playground/Pages/BubbleChart.xcplaygroundpage/Contents.swift index 1e574aa7d4..0fc6d448e8 100644 --- a/ChartsDemo-macOS/PlaygroundChart.playground/Pages/BubbleChart.xcplaygroundpage/Contents.swift +++ b/ChartsDemo-macOS/PlaygroundChart.playground/Pages/BubbleChart.xcplaygroundpage/Contents.swift @@ -59,7 +59,7 @@ for index in 0.. UIColor +{ + if #available(iOS 13, tvOS 13, *) + { + return .label + } + else + { + return .black + } +} +private let labelColor: UIColor = fetchLabelColor() + +extension UIColor +{ + static var labelOrBlack: UIColor { labelColor } +} + extension NSUITapGestureRecognizer { @objc final func nsuiNumberOfTouches() -> Int @@ -520,6 +538,24 @@ extension NSTouch } } +private func fetchLabelColor() -> NSColor +{ + if #available(macOS 10.14, *) + { + return .labelColor + } + else + { + return .black + } +} +private let labelColor: NSColor = fetchLabelColor() + +extension NSColor +{ + static var labelOrBlack: NSColor { labelColor } +} + extension NSScrollView { var scrollEnabled: Bool