title: Property observers on Dictionaries in Swift
body: <p>I want to call a delegate method when a new item is added to my dictionary.
  For single value properties the <code>didSet(newValue)</code> observer works fine. But for my dictionary it seems that the newUser argument below returns the full dictionary.</p>
  
  <pre><code>var userIdKeyedDict:Dictionary&lt;String, User&gt; = [:] {
      didSet(newUser) {
      println("Updating userIdKeyedDict")
      self.delegate.didAddUser(newUser)
  } 
  willSet(newUser) {
    println("Will set \(newUser)")
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The output from <code>willSet(newUser)</code> is:</p>
  
  <blockquote>
    <p>Will set [3E33BD4D-6F48-47FC-8612-565250126E51: User: userId: Optional("3E33BD4D-6F48-47FC-8612-565250126E51"), listenerUUID: Optional("77D01D6F-D017-EF9E-55A9-78570E455C51"), beaconUUID: nil]</p>
  </blockquote>
  
  <p>As more items are added the <code>newUser</code> simply contains the entire dictionary.</p>
  
  <p>How can I get a handle on just the new item added?</p>