티스토리 뷰
//웹에서 이미지 불러와서 표시
//http://imgmovie.naver.com/mdi/mi/0490/49008_P51_144449.jpg
UIImage *img = [[UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: @"http://imgmovie.naver.com/mdi/mi/0490/49008_P51_144449.jpg"]]] retain];
if (img != nil) { // Image was loaded successfully.
[myImageView setImage:img];
[myImageView setUserInteractionEnabled:NO];
[img release]; // Release the image now that we have a UIImageView that contains it.
}
//http://imgmovie.naver.com/mdi/mi/0490/49008_P51_144449.jpg
UIImage *img = [[UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: @"http://imgmovie.naver.com/mdi/mi/0490/49008_P51_144449.jpg"]]] retain];
if (img != nil) { // Image was loaded successfully.
[myImageView setImage:img];
[myImageView setUserInteractionEnabled:NO];
[img release]; // Release the image now that we have a UIImageView that contains it.
}
'나름 프로그래밍? > Objective-C' 카테고리의 다른 글
현재 시각 가져오기 (0) | 2010.04.22 |
---|---|
CATransition (0) | 2010.04.22 |
UIWebView (0) | 2010.04.21 |
Objective-C 에서의 Singleton (2) | 2010.04.17 |
5. Views, Drawing, and Animation (January 19, 2010) (0) | 2010.04.09 |