繁体   English   中英

如何同时为view和tabeview设置单个背景图像

[英]How to set the single background image for bothe view and tabeview

我正在开发一种应用程序。我在当前视图中添加了一个tableview。我为当前视图添加了背景图像。并且每当tableview添加到视图时,tableview都会覆盖视图并且该背景图像不会出现。但是我只需要显示tablecell内容与该背景相关。请告诉我如何解决此问题。

通过xib或代码将表格视图的背景色设置为“透明色”。 在您的viewDidLoad方法中编写:

yourTableView.backgroundColor = [UIColor clearColor];

告诉我是否有帮助!

您是否尝试清除UITableView的背景颜色。

tableviewObj.backgroundColor = [UIColor clearColor];

如果这不起作用,请发布您的示例代码以供我们参考。 谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM