动态imageview与文本iphone

时间:2009-11-03 12:48:03

标签: iphone image-processing

在我的UIView中。我需要显示动态图像,我的数组大小不固定。 我将遍历数组。 我想显示两个图像(两个图像都知道1.png和2.png) 并希望在图像上显示文字。

我尝试使用CGRectmake但需要帮助:(

请有人可以提出任何建议吗?任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:2)

只需将2 UIImageView和2 UILabel放入您的视图中,然后相应地设置属性:

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

yourLabel1.text = @"text one";
yourLabel2.text = @"text two";