views:

50

answers:

1

Hi ppl

In my UIView.I need to show dynamic images i have an array size not fixed. i will loop through the array. and i want to show two image ( Both images are known 1.png and 2.png ) and want to show text over that images.

i tried with CGRectmake but need help :(

Please Anyone can suggest anything ? any help will be appreciated !

+2  A: 

Just place 2 UIImageViews and 2 UILabels into your view, and then set the properties accordingly:

UIImage *image1 = [yourArray objectAtIndex:x];
UIImage *image2 = [yourArray objectAtIndex:y];
yourImageView1.image = image1;
yourImageView2.image = image2;

yourLabel1.text = @"text one";
yourLabel2.text = @"text two";
Pascal
What if i dont know the array length ?
Prasad-PHP Champ
`[yourArray count]` gives you this knowledge. :)
Pascal