iOS_app_test/tg_test/ProfileView.swift
2026-09-24 13:41:28 +08:00

60 lines
1.8 KiB
Swift

//
// ProfileView.swift
// tg_test
//
import SwiftUI
struct ProfileView: View {
@State private var notificationsEnabled = true
@State private var darkModeEnabled = false
var body: some View {
NavigationStack {
List {
Section {
HStack(spacing: 16) {
Image(systemName: "person.crop.circle.fill")
.font(.system(size: 60))
.foregroundStyle(.blue)
VStack(alignment: .leading, spacing: 4) {
Text("iOS Developer")
.font(.title3)
.bold()
Text("developer@example.com")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
.padding(.vertical, 8)
}
Section("Preferences") {
Toggle("Enable Notifications", isOn: $notificationsEnabled)
Toggle("Dark Mode", isOn: $darkModeEnabled)
}
Section("App Information") {
HStack {
Text("Version")
Spacer()
Text("1.0.0")
.foregroundStyle(.secondary)
}
HStack {
Text("Framework")
Spacer()
Text("SwiftUI")
.foregroundStyle(.secondary)
}
}
}
.navigationTitle("Profile")
}
}
}
#Preview {
ProfileView()
}