如何在X code显示背后的TableView图像 [英] How to display image behind TableView in Xcode

查看:146
本文介绍了如何在X code显示背后的TableView图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想补充我的身后表视图的背景图像。
我有我的文件staticTableControl.m,我填充表,我已经加
       - (无效)viewDidLoad中{

I want to add a background image behind my table view. I have my file staticTableControl.m where I populate the table and I have added -(void)viewDidLoad{

      self.tableView.backgroundColor=[UIColor colorWithPatternImage:[UIImage      imageNamed:@"disk2.jpg"]];
     [super viewDidLoad];
 }

在顶部,但图像不会加载 - 请有人可以告诉我还有什么我需要做什么?
谢谢

at the top, but the image doesn't load - please can someone advise me what else I need to do? Thank you

有过有关背景图像表的一些其他问题,但我无法找到一个明确这一点。

There have been some other questions about background images for tables, but I couldn't find one specifically for this.

推荐答案

一个很好的解决方案是将实现代码如下背景颜色变为透明,并添加一个ImageView的背后

A good solution is to change the tableview background color to transparent and add an imageview behind it

这篇关于如何在X code显示背后的TableView图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆