나름 프로그래밍?/ Objective-C
UIImageView
-Dong-
2010. 4. 21. 18:14
//웹에서 이미지 불러와서 표시
//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.
}