title: Loading an online GIF image into NSImageView
body: <p>I can't seem to get an online GIF image to load into an NSImageView. Please see my code below and offer some comments to remedy this.</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface ImageFromUrl : NSObject
  
  @property (strong) NSString *urlString;
  @property (strong) NSURL *url;
  @property (strong) NSImage *radarGif;
  @property (weak) IBOutlet NSImageView *radarGifView;
  
  - (void)displayUrlImage:(id)sender;
  
  @end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#import "ImageFromUrl.h"
  
  @implementation ImageFromUrl
  
  @synthesize urlString, url, radarGif, radarGifView;
  
  - (void)displayUrlImage:(id)sender {
      urlString = @"http://icons.wunderground.com/data/640x480/2xradarb5.gif";
      url = [NSURL URLWithString:urlString];
  
      radarGif = [[NSImage alloc] initWithContentsOfURL:url];
      [radarGifView setImage:radarGif];
  }
  
  @end
  </code></pre>
  
  <p>I am receiving no errors when I run the application and the image of the GIF is not showing in the window.</p>