title: write plist file swift
body: <p>i have a plist file, this file populate a form with settings; when I finish writing each textfield or switch, value is saved correctly, refresh my table correctly and my info its correct. But when i change the screen and return, my plist file is empty, i check several options:</p>
  
  <pre><code>...
  
  let path = NSBundle.mainBundle().pathForResource("perfilBitrubian", ofType: "plist")
  descripcionCelda.writeToFile(path!, atomically: false)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>...
  let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) as NSArray
  let documentsDirectory = paths.objectAtIndex(0) as! NSString
  let path = documentsDirectory.stringByAppendingPathComponent("perfilBitrubian.plist")
  descripcionCelda.writeToFile(path!, atomically: false)
  </code></pre>
  
  <p>My list has hidden options; when i hide and show my table refresh data correctly, but if i change the process and return the form; my plist file don't have info.</p>
  
  <p>i see this examples and I do not know what to do.</p>
  
  <p><a href="http://rebeloper.com/read-write-plist-file-swift/" rel="nofollow">http://rebeloper.com/read-write-plist-file-swift/</a></p>
  
  <p>and this:</p>
  
  <p><a href="http://www.appcoda.com/expandable-table-view/" rel="nofollow">http://www.appcoda.com/expandable-table-view/</a></p>
  
  <p>Thanks!</p>