UITableView背景图片问题

joe*_*joe 3 iphone objective-c ios4

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

self.tableView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]];
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我正在使用表格样式进行分组.但在显示中,我在分组单元格的左侧和右侧出现黑色阴影.

如何删除这个黑影?

提前致谢.

Anb*_*Raj 5

试试这个..

self.tableView.backgroundColor=[UIColor clearColor];
UIImage *backgroundImage = [UIImage imageNamed:@"sample2.png"];
UIImageView *backgroundImageView = [[UIImageView alloc]initWithImage:backgroundImage]; 
self.tableView.backgroundView=backgroundImageView;
[backgroundImageView release];
Run Code Online (Sandbox Code Playgroud)