title: How to store array list of custom objects to NSUserDefaults?
body: <pre><code>class Item
  {
      var name: String
      var collectionId: Int
  
      init(name: String, collectionId: Int) {
          self.name = name
          self.collectionId = collectionId
  
      }
  }
  
  class ViewController:UIViewController
  {
      var itemList = [Item]()
  
      func recievedResults()
      {
          let defaults = NSUserDefaults.standardUserDefaults()
          defaults.setObject(self.itemList, forKey: "myList")
      }        
  }
  </code></pre>
  
  <p>I get an error "property lists cannot contain objects of type 'CFType'"</p>
  
  <p>How do I store and get the itemList to NSUserDefaults?</p>