title: Swift 3 Saving array with UserDefaults
body: <p>I am trying to save an array to UserDefaults, but after running the app displays this <a href="https://i.stack.imgur.com/saEb6.png" rel="nofollow noreferrer">Error</a>. When the app crashes, Xcode displays correct values of the array, so the data are saved well into the array.
  I save the string data to array in first VC : </p>
  
  <pre><code> Last20Times.insert(dsa, at: 0) // Last20Times is the array.
   if Last20Times.count &gt; 0 {
     let defaults = UserDefaults.standard
     defaults.set(Last20Times, forKey: "last20") 
  </code></pre>
  
  <p>Second controller is TableView:</p>
  
  <pre><code> if indexPath.section == 1 {
     let ArrayLast20 = UserDefaults.standard.stringArray(forKey: "last20")
     cell.textLabel?.text = ArrayLast20?[indexPath.row]// error(picture)
   }
  
  return cell
  </code></pre>
  
  <p>Thank you</p>