ghi*_*boz 6 iphone background-image uiviewcontroller ipad
如何将来自资源的图像作为背景图像插入到我的UIViewController中?提前致谢!
luv*_*ere 18
添加它UIViewController的视图,有点像这样:
- (void) viewDidLoad
{
UIImage *background = [UIImage imageNamed: @"background.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage: background];
[self.view addSubview: imageView];
[imageView release];
[super viewDidLoad];
}
Run Code Online (Sandbox Code Playgroud)
UIViewControllers没有背景图片.只有视图本身具有视觉属性.
UIView没有背景图片属性.要显示背景图像,通常只需将UIImageView显示在视图层次结构中,以便在所有其他视图后面以可视方式显示.这可以通过编程方式或在Interface Builder中完成.
| 归档时间: |
|
| 查看次数: |
19985 次 |
| 最近记录: |