title: Property Observer for Swift with Objects
body: <p>I'm trying to add a property observer in my class ChooserListVC for "list"</p>
  
  <p>These are the variables in ChooserSaves that I would like to track.</p>
  
  <pre><code>class ChooserSaves: UIDocument {
  var savedListObject : SavedList?
  var listName : String = ""
  var chooserItems : [String] = []
  }
  </code></pre>
  
  <p>Im not sure how to set this up in the class I'm implementing it. </p>
  
  <pre><code>class ChooserListVC: UIViewController, UITableViewDelegate, UITableViewDataSource,UITextFieldDelegate{
  var list : ChooserSaves!
  </code></pre>
  
  <p>I tried to do something like this:</p>
  
  <pre><code>var list : ChooserSaves!{
      didSet{
          if chooserItems.count &gt; 0{
              println("didset greater than 1")
          }
          else{
              println("didset less than 1")
          }
      }
  }
  </code></pre>
  
  <p>But this only works once when the segue assigns the list. How can I make it so that every time I change <code>list.chooserItems</code> in other bits of code, it would trigger the correct line?</p>