title: swift: How to update NSUserDefault?
body: <p>So, I want to create my own mini social network. In registration page I have following lines of code:</p>
  
  <pre><code>var ns = NSUserDefaults.standardUserDefaults()    
  let array: [String] = ["\(login!)","\(password!)","\(nameSurname!)", "team", "university"] //team, university
  ns.setObject(array, forKey: "\(login)")
  </code></pre>
  
  <p>I just create array and set it to NSUserDefaults.</p>
  
  <p>And also I have page where users can change informations or datas about them, change their password for example. In this page i have following lines of code: </p>
  
  <pre><code>let login = loginTextField.text!
          let password = passwordTextField.text!
          let nameSurname = nameSurnameTextField.text!
          let team = teamTextField.text!
          let university = universityTextField.text!
  
              let ns = NSUserDefaults.standardUserDefaults()
              let array: [String] = ["\(login)","\(password)","\(nameSurname)", "\(team)", "\(university)"] //team, university course
              ns.setObject(array, forKey: "\(login)")
  </code></pre>
  
  <p>Here I create new array and set this new array to KEY-Login. But my datas in NSUserDefaults doesn't change. How I can fix it? What I should do? Thanks)</p>