简体   繁体   English

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

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

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

Set the background Color for your table view to 'Clear Color' either through xib or through code. 通过xib或代码将表格视图的背景色设置为“透明色”。 In your viewDidLoad method write: 在您的viewDidLoad方法中编写:

yourTableView.backgroundColor = [UIColor clearColor];

Tell me if it helps! 告诉我是否有帮助!

Did you tried to clear the background color for UITableView. 您是否尝试清除UITableView的背景颜色。

tableviewObj.backgroundColor = [UIColor clearColor];

If this is not working, please post your sample code for our reference. 如果这不起作用,请发布您的示例代码以供我们参考。 Thanks. 谢谢。

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

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