The cells of my UITableView are grouped text fields. When I run my code on the emulator, I get this:
As you can see there is a gray area around the text fields while the background of the UITableView and the button is white. Is it possible to remove, or make invisible, the gray border (not the separator or the frame but the area) around the grouped cells? If so, how can I do that?
Update: Background color is working on iPhone but not on iPad. I'm working on iPad.
I fixed the problem. Solution:
UIView *clearView = [[UIView alloc] initWithFrame:[myTableView bounds]];
clearView.backgroundColor = [UIColor clearColor];
myTableView.backgroundView = clearView;
[clearView release];
Since setting the background on the xib file is not working, I did it programatically. Here, myTableView
is the tableView object on the xib. As you can see, I replaced the background view with a view that has a clear color (transparent). The desired effect is achieved.