📜  swift userdefaults 枚举 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:03.150000             🧑  作者: Mango

代码示例2
//in the didMoveToView method put this code in
switchCurrentType = ExampleEnum(rawValue: UserDefaults.standard.integer(forKey: "CurrentDefaultType"))! //make sure exclamation mark at the end is there or it won't read properly