forked from JohJakob/Setting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContentView.swift
More file actions
41 lines (36 loc) · 1.02 KB
/
ContentView.swift
File metadata and controls
41 lines (36 loc) · 1.02 KB
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
//
// ContentView.swift
// SettingExample
//
// Created by A. Zheng (github.com/aheze) on 2/22/23.
// Copyright © 2023 A. Zheng. All rights reserved.
//
import Setting
import SwiftUI
struct ContentView: View {
@AppStorage("selectedIndex") var selectedIndex = 1
var body: some View {
TabView(selection: $selectedIndex) {
PreferencesView()
.tabItem {
Label("Preferences", systemImage: "text.book.closed")
}
.tag(0)
SettingsView()
.tabItem {
Label("Settings", systemImage: "gearshape")
}
.tag(1)
ControlPanelView()
.tabItem {
Label("Control Panel", systemImage: "dial.high")
}
.tag(2)
PlaygroundView()
.tabItem {
Label("Playground", systemImage: "gamecontroller")
}
.tag(3)
}
}
}