is it possible to store a set of boolean variables by using @AppStorage.
Currently I use e.g. this situation:
class UserSettings: ObservableObject {
@Published var localTime : Bool {
didSet {
UserDefaults.standard.set(localTime, forKey:"local")
}
}
...
init() {
self.localTime = UserDefaults.standard.object(forKey: "local") as? Bool ?? false
...
}
}
Thanks for your support.
Peter
question from:
https://stackoverflow.com/questions/65845006/using-appstorage 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…