The other day I wanted to embed a UITableViewController into a UIViewController. The UIViewController had a background image on it, and I wanted the UITableViewController’s view to have a clear background. I tried setting the background color to [UIColor clearColor] and it worked in the storyboard, but at runtime, the background went to it’s default color. I then changed the background color to [UIColor redColor] just to see if it had something to do with clearColor. I ran that and it had the same effect.
Turns out that if you want to set the background color of a UITableView, you must remove the background view in order to see the background color that was set in Interface Builder. Here’s how I did it.
((UITableView*)view).backgroundView = nil;