http://mobiledevelopertips.com/cocoa/download-and-create-an-image-from-a-url.html
URL 원격 이미지
에 우리는 URL을 생성하여 시작 원격 리소스에 :
NSURL *url = [NSURL URLWithString: @"http://mobiledevelopertips.com/images/logo-iphone-dev-tips.png"];
을 NSData 다음 단계는 원격 영상 내용을 유지하는있는 NSData 객체로 구성 URL에서 다운로드 한 데이터를 사용하여있는 UIImage, 구축하는 것입니다
에서있는 UIImage 만들기 :
UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:url]];
을 함께하기
UIImageView fr을 생성하여 원격 뷰를 서브 뷰로 추가하는 방법은 다음과 같습니다. 옴 위에있는 UIImage :
NSURL *url = [NSURL URLWithString:@"http://mobiledevelopertips.com/images/logo-iphone-dev-tips.png"];
UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:url]];
[self.view addSubview:[[UIImageView alloc] initWithImage:image]];
[당신은 시도 무엇?] (http://mattgemmell.com/2008/12/08/what-have-you-tried/) I가 이미지를 다운로드하려면 어떻게 –