【发布时间】:2014-03-15 05:22:10
【问题描述】:
如何在背景图像中设置图像(即如何将图像粘贴到背景图像中)。我在 UIViewController 中将一张图像作为背景图像。现在我想把另一个图像放在背景图像中。我知道如何将图像作为背景图像放在 UIViewController 中。但我不知道如何将图像放在背景图像中。我尝试了代码。但图像会未显示在背景图像中。这是我的代码。请帮助我。提前致谢。
-(void)viewDidLoad
{
backgroundImage=[UIImage imageNamed:@"bg-small.PNG"];
audioViewBackgroundImage=[[UIImageView alloc]initWithImage:backgroundImage];
[self.view addSubview:audioViewBackgroundImage];
mImage=[UIImage imageNamed:@"muluguphoto.png"];
mBackgroundImage=[[UIImageView alloc]initWithFrame:CGRectMake(20, 160, 150, 90)];
mBackgroundImage=[[UIImageView alloc]initWithImage:mImage];
[audioViewBackgroundImage addSubview:mBackgroundImage];
}
【问题讨论】:
-
请任何人帮助我....
标签: ios iphone objective-c xcode uiimageview