gpt4 book ai didi

iphone - UITableView背景图片问题

转载 作者:搜寻专家 更新时间:2023-10-30 20:01:08 24 4
gpt4 key购买 nike

我正在使用 UITableView。我像这样设置 tableview 背景图像。

self.tableView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]];

enter image description here

我正在使用分组的表格样式。但在显示中,我在分组单元格的左侧和右侧得到黑色阴影。

如何去掉这个黑影?

提前致谢。

最佳答案

试试这个..

self.tableView.backgroundColor=[UIColor clearColor];
UIImage *backgroundImage = [UIImage imageNamed:@"sample2.png"];
UIImageView *backgroundImageView = [[UIImageView alloc]initWithImage:backgroundImage];
self.tableView.backgroundView=backgroundImageView;
[backgroundImageView release];

关于iphone - UITableView背景图片问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7440152/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com