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
@@ -10,7 +10,7 @@ public struct StartStopButton: View {
public var body: some View {
viewBuilder {
if ApplicationLibrary.inPreview {
#if os(iOS)
#if os(iOS) || os(tvOS)
Toggle(isOn: .constant(true)) {
Text("Enabled")
}
@@ -23,7 +23,7 @@ public struct StartStopButton: View {
} else if let profile = extensionProfile.wrappedValue {
Button0(profile)
} else {
#if os(iOS)
#if os(iOS) || os(tvOS)
Toggle(isOn: .constant(false)) {
Text("Enabled")
}
@@ -49,7 +49,7 @@ public struct StartStopButton: View {
var body: some View {
viewBuilder {
#if os(iOS)
#if os(iOS) || os(tvOS)
Toggle(isOn: Binding(get: {
profile.status.isConnected
}, set: { newValue, _ in