简体   繁体   English

是否可以将自定义背景图像设置为分组tableView?

[英]Is it possible to set a custom background image to grouped tableView?

I want to set a custom background (image) to my grouped table view. 我想将自定义背景(图像)设置为我的分组表视图。 In xib file I added the imageView under the table, set table's back to clearColor and it looks normal (in Xib!) But when I launch the application I see standard background 在xib文件中,我在表格下添加了imageView,将表格设置回clearColor,看起来很正常(在Xib中!)但是当我启动应用程序时,我看到标准背景

In Xib file: 在Xib文件中:

在此输入图像描述

In Application: 在申请中:

在此输入图像描述

// instead of adding a UIImageView to the background
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image_name"]];
self.tableView.backgroundColor = [UIColor clearColor];

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

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