Improve onboarding iCloud linking
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import UIKit
|
||||||
|
|
||||||
struct OnboardingView: View {
|
struct OnboardingView: View {
|
||||||
@Binding var onboardingCompleted: Bool
|
@Binding var onboardingCompleted: Bool
|
||||||
@@ -274,6 +275,16 @@ struct OnboardingQuickStartView: View {
|
|||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
Button {
|
||||||
|
openAppSettings()
|
||||||
|
} label: {
|
||||||
|
Label("Open iCloud Settings", systemImage: "gear")
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.background(Color.appPrimary.opacity(0.1))
|
||||||
|
.cornerRadius(12)
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
@@ -304,6 +315,11 @@ struct OnboardingQuickStartView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func openAppSettings() {
|
||||||
|
guard let url = URL(string: UIApplication.openSettingsURLString) else { return }
|
||||||
|
UIApplication.shared.open(url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - First Launch Welcome
|
// MARK: - First Launch Welcome
|
||||||
|
|||||||
Reference in New Issue
Block a user