×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Objective-C
Posted by: Massimo Zappino
Added: Mar 22, 2012 8:49 AM
Modified: Mar 22, 2012 8:57 AM
Views: 44
  1. // A new URL to the remote resource
  2. NSURL *url = [NSURL URLWithString:
  3.    @"http://tagmycode.com/images/logo.png"];
  4.  
  5. // Create a new UIImage object from url
  6. UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:url]];
  7.  
  8. // display image
  9. [self.view addSubview:[[UIImageView alloc] initWithImage:image]];