Page MenuHomeMusing Studio

SettingsView.swift
No OneTemporary

SettingsView.swift

import SwiftUI
struct MacAccountView: View {
@ObservedObject var preferences: PreferencesModel
@ObservedObject var account: AccountModel
@State var selectedView = 0
var body: some View {
TabView(selection: $selectedView) {
Form {
Section(header: Text("Login Details")) {
AccountView(account: account)
}
}
.tabItem {
Image(systemName: "person.crop.circle")
Text("Account")
}
.tag(0)
VStack {
PreferencesView(preferences: preferences)
Spacer()
}
.tabItem {
Image(systemName: "gear")
Text("Preferences")
}
.tag(1)
}
}
}
struct SettingsView_AccountTabPreviews: PreviewProvider {
static var previews: some View {
MacAccountView(preferences: PreferencesModel(), account: AccountModel(), selectedView: 0)
}
}
struct SettingsView_PreferencesTabPreviews: PreviewProvider {
static var previews: some View {
MacAccountView(preferences: PreferencesModel(), account: AccountModel(), selectedView: 1)
}
}

File Metadata

Mime Type
text/x-c
Expires
Mon, Nov 25, 1:53 AM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3106499

Event Timeline