views:

67

answers:

2

I am trying to display a UITableView in front of an image, and here's the steps I'm following:

  • Inside the view, add a UIImageView with the image set to the appropriate file in the project
  • Add a UITableView inside the parent view (the same parent as the image view)
  • Set the backgroundColor for the table view to clear
  • Wire up a datasource in the view controller to display some test data
  • Hook up the data source in IB.

After doing this, the tableviewcells have a black background in the corners. It isn't coming from any of the parent views as far as I can tell. I have a test project at bitbucket which demonstrates the issue.

+3  A: 

Jeff Lamarche ran into the exact same issue today and put up a blog post about it: http://iphonedevelopment.blogspot.com/2010/08/transparent-grouped-tableviews.html

Basically, there appears to be some bug where you still need to add this in code (even though you already have the tableView set to be clear in Interface Builder):

self.tableView.backgroundColor = [UIColor clearColor];
Jawboxer
+1 - Legend: thank you!
Khanzor
another +1 :) I owe you a beer. You would have hoped Apple would have fixed this by now.
gef