带有背景图像的 UIViewController [英] UIViewController with background image
本文介绍了带有背景图像的 UIViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将资源中的图像作为背景图像插入到我的 UIViewController 中?提前致谢!
How can I insert into my UIViewController an image from the resources as background image? thanks in advance!
推荐答案
添加UIViewController
的视图,有点像这样:
Add it UIViewController
's view, somewhat like this:
- (void) viewDidLoad
{
UIImage *background = [UIImage imageNamed: @"background.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage: background];
[self.view addSubview: imageView];
[imageView release];
[super viewDidLoad];
}
这篇关于带有背景图像的 UIViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文