Open onmyway133 opened 2 years ago
Make it easy to access common cases, for example UserDefaults
UserDefaults
extension UserDefaults { enum Key: String { case hasBackup } subscript(key: Key) -> Bool { get { bool(forKey: key.rawValue) } set { set(newValue, forKey: key.rawValue) } } } UserDefaults.standard.hasBackup] = true
the last line should be UserDefaults.standard[.hasBackup] = true
UserDefaults.standard[.hasBackup] = true
Make it easy to access common cases, for example
UserDefaults