2

I have an UITableView in my application, which is in an UIView that has it's background colour to the Scroll View Texture thing. This is all in an UIViewController. It works all nicely and stuff, but I get these fugly black corners around my table view edges:

enter image description here

The Background colour of the table view is set to the clear colour, and those squares even appear in Interface Builder. Any ideas on how to eradicate these evil UI blemishes? They make my UI look like something that was thrown together in 3 minutes, even when I spent more than a week designing my entire UI. It makes me want to punch UITableView in the face, too.

Tristan
  • 3,058
  • 6
  • 40
  • 68
  • The root cause of why you have to set the color in code is here: http://stackoverflow.com/questions/1557856 – David H Aug 04 '11 at 17:50

2 Answers2

7

Quite strangely, setting the background to clear in code seemed to solve it for me. It is a really weird issue, and I submitteda bug report to Apple about this, although their bug reporter needs it's own bug reporter.

Tristan
  • 3,058
  • 6
  • 40
  • 68
  • Worked for me. Even though I set the same values in IB, I had so set the tableview background color to clear in my viewDidLoad – CornPuff May 24 '11 at 03:23
  • The problem is there are "two" types of clearColor and one works and the other does not. See my post on http://stackoverflow.com/questions/1557856 - I also submitted a bug that contains the root cause - the different clear colors. – David H Aug 04 '11 at 17:49
1

Also make sure the background color is not just clear color, but that opaque is NO.

makdad
  • 6,402
  • 3
  • 31
  • 56
  • I did set Opaque to NO, but that did not seem to do anything. The black corners are still there. – Tristan Feb 22 '11 at 04:35
  • I had the same problems when I was drawing an image as background in my custom cell. You should also check the background color for the cell, and for the contentView in the cell. – Andrei Stanescu Feb 22 '11 at 16:08
  • I figured out that I had to set the table view background colour in code, as I said in my answer above. – Tristan Feb 25 '11 at 09:59