Skip to content

Commit 8f17ab3

Browse files
committed
Allow building code for tvOS and watchOS.
1 parent e113228 commit 8f17ab3

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Sources/MarkdownKit/AttributedString/Color.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
}
4545
}
4646

47-
public let mdDefaultColor = UIColor.darkText.hexString
48-
public let mdDefaultBackgroundColor = UIColor.systemBackground.hexString
49-
5047
#elseif os(macOS)
5148

5249
import Cocoa
@@ -68,3 +65,20 @@
6865
public let mdDefaultBackgroundColor = NSColor.textBackgroundColor.hexString
6966

7067
#endif
68+
69+
#if os(iOS)
70+
71+
public let mdDefaultColor = UIColor.label.hexString
72+
public let mdDefaultBackgroundColor = UIColor.systemBackground.hexString
73+
74+
#elseif os(tvOS)
75+
76+
public let mdDefaultColor = UIColor.label.hexString
77+
public let mdDefaultBackgroundColor = UIColor.white.hexString
78+
79+
#elseif os(watchOS)
80+
81+
public let mdDefaultColor = UIColor.black.hexString
82+
public let mdDefaultBackgroundColor = UIColor.white.hexString
83+
84+
#endif

0 commit comments

Comments
 (0)