Just Code‎ > ‎

iPhone - Snippet to load image and add to view

posted Dec 17, 2010, 5:29 AM by Peter Henell
http://stackoverflow.com/questions/4442126/how-to-draw-a-speech-bubble-on-an-iphone
CGRect myRect = CGRectMake(10.0f, 0.0f, 300.0f, 420.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myRect];
[myImage setImage:[UIImage imageNamed:@"ThisIsMyImageName.png"]];
myImage.opaque = YES;
[self.view addSubview:myImage];
[myImage release];
Comments