How to remove bounding (UITableView) grouped text boxes
The cells in my UITableView are grouped text boxes. When I run my code on the emulator, I get this:
As you can see, there is a gray area around the text boxes, and the background of the UITableView and the button are white. Is it possible to remove or make invisible a gray border (not a separator or border other than an area) around the grouped cells? If so, how can I do this?
Update. Background color works on iPhone but not iPad. I am working on an iPad.
I fixed the problem. Decision:
UIView *clearView = [[UIView alloc] initWithFrame:[myTableView bounds]];
clearView.backgroundColor = [UIColor clearColor];
myTableView.backgroundView = clearView;
[clearView release];
Since setting the background in the xib file doesn't work, I did it programmatically. Here myTableView
is a tableView object on xib. As you can see, I replaced the background view with a clear color (transparent) view. The desired effect is achieved.
source to share
If you mean tableview background color you can do it in nib
Clearing the background color simply means you have to know what's at the table - as you will see!
If you mean a border with a gray border, you must do it in code. So let's say the viewDidLoad method of the class that owns the table view.
self.tableView.separatorColor = [UIColor clearColor];
source to share