-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyApp.swift
46 lines (43 loc) · 1.25 KB
/
MyApp.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import SlideOverCard
import SwiftUI
@main
struct MyApp: App {
@AppStorage("FirstStart") var alertShouldBeShown = true
init() {
#if DEBUG
if let bundleID = Bundle.main.bundleIdentifier {
UserDefaults.standard.removePersistentDomain(forName: bundleID)
}
#endif
}
var body: some Scene {
WindowGroup {
TabView {
ToolExploreView()
.tabItem {
Label("Tools", systemImage: "wrench.and.screwdriver.fill")
}
LearnExploreView()
.tabItem {
Label("Learn", systemImage: "graduationcap")
}
}
.slideOverCard(
isPresented: $alertShouldBeShown,
onDismiss: {
alertShouldBeShown = false
}
) {
VStack(spacing: 22) {
Text("Welcome to GoDigit")
.font(.title).bold()
Text("Discover a suite of convenient tools designed for working with computer number representations here. Plus, it is a great place for learning how computers manipulate the numbers.")
Text("Author's website: [https://rewired.moe](https://rewired.moe)")
Button("Continue", action: {
alertShouldBeShown = false
}).buttonStyle(SOCEmptyButton())
}
}
}
}
}