Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. [self performSelectorInBackground:@selector(setImage) withObject:nil];
  2.  
  3. -(void)setImage
  4. {
  5. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
  6.  
  7. NSString *strUrl = @"--some URL--";
  8.  
  9. NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:strUrl]];
  10. UIImage *myimage = [[UIImage alloc] initWithData:imageData];
  11.  
  12. [pool release];
  13. [imageData release];
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement