Categories
Uncategorized

[memo] iPhone display images sample code

FROM URL : http://www.iphoneexamples.com/

CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"myImage.png"]];
myImage.opaque = YES;
[self.view addSubview:myImage];
[myImage release];
//  or
UIImage *imagesource = [UIImage imageNamed:@"userbutton.gif"];
myphoto.image = imagesource;
//