Display Images in iPhone using UIImageView

Here is the code that will display the image using UIImageView in Objective-C.


CGRect imgRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);
UIImageView *image = [[UIImageView alloc] initWithFrame:imgRect];
[image setImage:[UIImage imageNamed:@"SampleImage.png"]]; // where SampleImage.png should be available within in the project
[self.view addSubview:image];
[image release];

Comments

Popular posts from this blog

Integrating ZXing QR Code reader in iPhone / iOS applications

Multiple line of text in UIPickerView

Connect Samsung devices to Kies on Mac