title: Using assetForURL in Swift 1.2
body: <p>I'm trying to get an image which is on the photo library, and I'm using assetForURL for that purpose, but I get all the time the error "Cannot invoke 'assetForURL' with an argument list of type '(NSURL, resultBlock: (ALAsset!) -> Void, (NSError!) -> Void)'"</p>
  
  <p>I've checked questions here and how other people use that method, but I get always the same error.. Here is my method:</p>
  
  <pre><code>class func getImageFromPath(path: String) -&gt; UIImage? {
      let assetsLibrary = ALAssetsLibrary()
      let url = NSURL(string: path)!
  
      assetsLibrary.assetForURL(url, resultBlock: { (asset: ALAsset!) -&gt; Void in
          return UIImage(CGImage: asset.defaultRepresentation().fullResolutionImage())
      }) { (error: NSError!) -&gt; Void in
          return nil
      }
  }
  </code></pre>
  
  <p>I don't know what I'm missing.. thx!</p>