title: Cast from '[NSObject : AnyObject]?' to unrelated type 'NSDictionary' always fails
body: <p>This line  <code>let userInfo = notification.userInfo as! NSDictionary</code>  I get a warning: <code>Cast from '[NSObject : AnyObject]?' to unrelated type 'NSDictionary' always fails</code> </p>
  
  <p>I try to use <code>let userInfo = notification.userInfo as! Dictionary&lt;NSObject: AnyObject&gt;</code> replace <code>let userInfo = notification.userInfo as! NSDictionary</code>. But I get an error :<code>Expected '&gt;' to complete generic argument list</code>. How to fix the warning.</p>
  
  <p>Xcode 7.1  OS X Yosemite</p>
  
  <p>This is my code:</p>
  
  <pre><code>func keyboardWillShow(notification: NSNotification) {
  
      let userInfo = notification.userInfo as! NSDictionary //warning
  
      let keyboardBounds = (userInfo[UIKeyboardFrameEndUserInfoKey] as! NSValue).CGRectValue()
      let duration = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as! NSNumber).doubleValue
      let keyboardBoundsRect = self.view.convertRect(keyboardBounds, toView: nil)
  
      let keyboardInputViewFrame = self.finishView!.frame
  
      let deltaY = keyboardBoundsRect.size.height
  
      let animations: (()-&gt;Void) = {
  
          self.finishView?.transform = CGAffineTransformMakeTranslation(0, -deltaY)
      }
  
      if duration &gt; 0 {
  
  
  
      } else {
  
          animations()
      }
  
  
  }
  </code></pre>