2010年12月1日水曜日

UIImage でURL の画像を表示する。

  NSString *path = @"http://*******/************/**.jpg"; // URL
  NSURL* url = [NSURL URLWithString:path];
  NSData* data = [NSData dataWithContentsOfURL:url];
  photo = [[UIImageView alloc] initWithImage:[[UIImage alloc] initWithData:data]];
  [self.view photo];