Add support for tvOS

This commit is contained in:
世界
2023-07-29 09:44:31 +08:00
parent 5a8f3a770f
commit bb0385f53c
63 changed files with 1542 additions and 389 deletions
@@ -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
}