Add support for tvOS

This commit is contained in:
世界 committed 2023-07-29 09:44:31 +08:00
1 parent 5a8f3a770f
commit bb0385f53c
63 files changed
+1542 -389

No files matched your search

@@ -17,19 +17,21 @@ public func FormTextItem(_ name: String, _ value: String) -> some View {
Text(value)
.multilineTextAlignment(.trailing)
.font(Font.system(.caption, design: .monospaced))
#if os(iOS) || os(macOS)
.textSelection(.enabled)
#endif
}
}
public func FormItem(_ title: String, @ViewBuilder content: () -> some View) -> some View {
#if os(iOS)
#if os(iOS) || os(tvOS)
HStack {
Text(title)
Spacer()
Spacer()
content()
}
#else
#elseif os(macOS)
content()
#endif
}