mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-05 23:19:10 +00:00
Add OnboardingView for iPads
This commit is contained in:
@@ -20,13 +20,18 @@ import SwiftUI
|
|||||||
|
|
||||||
struct PadView: View {
|
struct PadView: View {
|
||||||
@State var screen: Screen? = .all
|
@State var screen: Screen? = .all
|
||||||
|
@State var showOnboarding = !UserDefaults.standard.bool(forKey: "skipOnboarding")
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
SidebarView(state: $screen)
|
SidebarView(state: $screen)
|
||||||
}
|
}
|
||||||
.navigationViewStyle(DoubleColumnNavigationViewStyle())
|
.navigationViewStyle(DoubleColumnNavigationViewStyle())
|
||||||
|
.sheet(isPresented: self.$showOnboarding, onDismiss: {
|
||||||
|
UserDefaults.standard.set(true, forKey: "skipOnboarding")
|
||||||
|
}) {
|
||||||
|
OnboardingView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ struct SidebarView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if #available(iOS 14.0, *) {
|
if #available(iOS 14.0, *) {
|
||||||
List {
|
List(selection: $state) {
|
||||||
NavigationLink(
|
NavigationLink(
|
||||||
destination: CircularList(),
|
destination: CircularList(),
|
||||||
tag: Screen.all,
|
tag: Screen.all,
|
||||||
|
|||||||
Reference in New Issue
Block a user