NSUserDefaults

1.存储内容:

UserDefaults.standard.set((data["data"]["message"]).string, forKey: kRegisterPopupMessage)

2.获取内容:

let registerPopupMessage = UserDefaults.standard.string(forKey: kRegisterPopupMessage)

3.移除内容:

UserDefaults.standard.removeObject(forKey: kRegisterPopupMessage)

你可能感兴趣的:(NSUserDefaults)