Guest User

Untitled

a guest
May 23rd, 2019
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func getLocalData(key:String):String
  2. {
  3. if let value = NSUserDefaults.standard.string(forKey: key) {
  4. return value
  5. }else{
  6. return ""
  7. }
  8. }
  9.  
  10.  
  11. func setLocalData(key:String,value:String)
  12. {
  13. UserDefaults.standard.set(value, forKey: key)
  14. }
RAW Paste Data