///存到本地的数据
UserDefaults.standard.set("你好", forKey: "work_number");
///获取存储的本地数据
let workNumber = UserDefaults.standard.object(forKey: "work_number");
///存到本地的数据
UserDefaults.standard.set("你好", forKey: "work_number");
///获取存储的本地数据
let workNumber = UserDefaults.standard.object(forKey: "work_number");
本文标题:Swift:UserDefaults
本文链接:https://www.haomeiwen.com/subject/waajbrtx.html
网友评论