Skip to content

Commit cc1ea44

Browse files
committed
Fix protect level for dynamic provider color, available for tvOS now.
1 parent 809d024 commit cc1ea44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,23 @@ public extension UIColor {
3232
- parameter light: Color for light interface style.
3333
- parameter dark: Color for dark interface style.
3434
*/
35-
#if !os(watchOS) && !os(tvOS)
35+
#if !os(watchOS)
3636
convenience init(light: UIColor, dark: UIColor) {
3737
if #available(iOS 13.0, tvOS 13.0, *) {
3838
self.init(dynamicProvider: { $0.userInterfaceStyle == .dark ? dark : light })
3939
} else {
4040
self.init(cgColor: light.cgColor)
4141
}
4242
}
43+
#endif
4344

4445
/**
4546
SparrowKit: Create color for interface levels.
4647

4748
- parameter baseInterfaceLevel: Color for basic interface level.
4849
- parameter elevatedInterfaceLevel: Color for elevated interface level.
4950
*/
51+
#if !os(watchOS) && !os(tvOS)
5052
convenience init(baseInterfaceLevel: UIColor, elevatedInterfaceLevel: UIColor ) {
5153
if #available(iOS 13.0, tvOS 13.0, *) {
5254
self.init { traitCollection in

0 commit comments

Comments
 (0)