title: In Swift 2, what changed in NSDictionary?
body: <p>In Swift 2, what exactly changed in the <code>NSDictionary(objects, forKeys)</code> <em>(Objective-C: dictionaryWithObjects:forKeys:)</em> creation?</p>
  
  <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/index.html#//apple_ref/occ/clm/NSDictionary/dictionaryWithObjects:forKeys:" rel="nofollow">Apple's prerelease documentation</a> was particularly useless, given that there only is Obj-C code. Even though there's a slight but obvious change in the provided snippet, I don't speak obj-c and haven't made sense out of the change so far. </p>
  
  <p>Here's some code for you guys:</p>
  
  <pre><code>videoDataOutput.videoSettings = NSDictionary(objects: NSNumber(kCVPixelFormatType_32BGRA), forKeys: (kCVPixelBufferPixelFormatTypeKey))
  //Working old Swift code; missing argument for parameter 'count' in call on Swift 2
  
  + (instancetype)dictionaryWithObjects:(NSArray *)objects
                                forKeys:(NSArray *)keys
  //Old Obj-C code
  
  
  + (instancetype nonnull)dictionaryWithObjects:(NSArray&lt;ObjectType&gt; * nonnull)objects
                                        forKeys:(NSArray&lt;id&lt;NSCopying&gt;&gt; * nonnull)keys
  //New Obj-C code
  </code></pre>
  
  <p>I've read elsewhere that nonnull is supposed to facilitate compatibility with Swift, but what about <code>&lt;ObjectType&gt;</code>? And what's <code>id</code>?</p>
  
  <p>@Update
  Fixed swift code from <code>NSDictionary(objectsAndKeys: )</code> to <code>NSDictionary(objects: , forKeys:)</code></p>