-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContentView.swift
66 lines (53 loc) · 1.73 KB
/
ContentView.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import SwiftUI
import Charts
struct ContentView: View {
@State private var selectedTab = 0
@State private var showSettings = false
@State private var showQiblaView = false
@State private var showQuranView = false
@State private var showSunnahView = false
@StateObject private var locationManager = LocationManager()
var body: some View {
TabView(selection: $selectedTab) {
QuranView(isPresented: $showQuranView)
.tabItem {
Image(systemName: "book.fill")
Text("Quran")
}
.tag(2)
SunnahView()
.tabItem {
Image(systemName: "sun.max.fill")
Text("Sunnah")
}
.tag(3)
MainView(showSettings: $showSettings)
.tabItem {
Image(systemName: "house.fill")
Text("Home")
}
.tag(0)
QiblaCompassView()
.environmentObject(locationManager)
.tabItem {
Label("Qibla", systemImage: "location.north.line")
}
.tag(1)
CommunityView()
.tabItem {
Image(systemName: "book.fill")
Text("Community")
}
.tag(4)
}
.accentColor(.green)
.sheet(isPresented: $showSettings) {
SettingsView()
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}