How to extract image from url
<p>I am trying to extract an image from a url and place it in an image view. </p>

<p>Here is my code, but it doesn't work:</p>

<pre><code>NSURL *imageURL = [NSURL URLWithString:@"http://www.huffingtonpost.com/entry/china-trump-sovereignity_us_5852000ee4b02edd4115d99b"];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *image = [UIImage imageWithData:imageData];
_imageView.image = image;
</code></pre>

<p>How do I extract the image? (the url is only an example)</p>