title: ALAssetsLibrary.enumerateGroupsWithTypes first parameter in Swift
body: <p>I try to use the <code>enumerateGroupsWithTypes</code> method of the <code>ALAssetsLibrary</code> class but I get an error with the first parameter.</p>
  
  <h2>The method's prototype :</h2>
  
  <pre><code>func enumerateGroupsWithTypes(types: ALAssetsGroupType,
      usingBlock enumerationBlock: ALAssetsLibraryGroupsEnumerationResultsBlock!,
      failureBlock: ALAssetsLibraryAccessFailureBlock!)
  </code></pre>
  
  <h2>How I call this method :</h2>
  
  <pre><code>assetLib.enumerateGroupsWithTypes(ALAssetsGroupAll, usingBlock: success, failureBlock: fail)
  </code></pre>
  
  <p>but I get a compile error <code>'CUnsignedInt' is not convertible to 'ALAssetsGroupType'</code></p>
  
  <h2>Other tests :</h2>
  
  <p>Based on what I've found on internet and my own tests, I've also tried </p>
  
  <h3>Test 1</h3>
  
  <pre><code>assetLib.enumerateGroupsWithTypes(ALAssetsGroupAll as ALAssetsGroupType, usingBlock: success, failureBlock: fail)
  </code></pre>
  
  <p>And the result is a compile error <code>Cannot convert the expression's type 'Void' to type 'ALAssetsGroupType'</code></p>
  
  <h3>Test 2</h3>
  
  <pre><code>assetLib.enumerateGroupsWithTypes(ALAssetsGroupType(ALAssetsGroupAll), usingBlock: success, failureBlock: fail)
  </code></pre>
  
  <p>And the result is a runtime error <code>EXC_BAD_ACCESS</code> and an XCode crash.</p>