title: How to change the border color of a Grouped UITableView
body: <p>This concerns iPhoneOS-sdk-3.2</p>
  
  <p>I am having difficulty changing the border color of a grouped UITableView.  I can change the cell background color, separator color, text color, quite easily now, and the rounded corners clip correctly, even when highlighted with whatever colors I have chosen. However the surrounding border remains infuriatingly gray despite many different attempts.</p>
  
  <p>I have read all of the related posts I can find via Google, let alone stackoverflow. I have seen Mike Akers' heroic PITA solution for UITableViewCell clipping -- this problem is solved for iPhoneOS 3.0 and it did not help me with the border. </p>
  
  <p>I have tried both a programmatic and xib-based solution and both provide the same results.</p>
  
  <p>I will share the programmatic version below:</p>
  
  <p>I have a UIViewController subclass rather than a UITableViewController subclass to act as a UITableView delegate -- I chose this route as I am coding on the iPad and UITableViewController reportedly takes over the whole screen.  loadView method of my UIViewController subclass:</p>
  
  <pre><code>- (void) loadView {
    self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    [self.view release];
    self.view.backgroundColor = [UIColor blackColor];
  
    // add and configure UITableView                                                                                     
    CGRect tableViewRect = CGRectMake(0., 0., 256., 768.);
  
    myTableView = [[UITableView alloc] initWithFrame:tableViewRect style:UITableViewStyleGrouped];
  
    // set the tableview delegate to this object and the datasource to the datasource which has already been set          
    myTableView.delegate = self;
    myTableView.dataSource = self;
  
    myTableView.sectionIndexMinimumDisplayRowCount = 1;
  
    myTableView.backgroundColor = [UIColor clearColor];
    myTableView.separatorColor = [UIColor whiteColor];
    myTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
  
    myTableView.opaque = NO;
  
    // add the table view to our background view                                                                          
    [self.view addSubview:myTableView];
    [myTableView release];
  }
  </code></pre>