How to change background of UITableViewController in GroupedStyle

I'm trying to change the color of a UITableViewController when using a split view. Then the style is set to grouped, the background seems to light gray no matter what.

I create a new iPad Split Application solution and add the following code to RootViewController:

public RootViewController () : base( UITableViewStyle.Grouped) // base ("RootViewController", null)

            this.TableView.BackgroundColor = UIColor.Red;
            this.View.BackgroundColor = UIColor.Red;
            this.View.Layer.BorderColor = UIColor.Green.CGColor;
            this.TableView.BackgroundView.BackgroundColor = UIColor.Brown;

I'm pulling my hair out trying to work out why its always light gray.


You do not change the color of the controller but of one (or many) of its views.

Also it's generally TintColor that must be used (not BackgroundColor). A bit confusing (I think it's related to the use of gradients, over the background, used in many place - but I could be wrong).

Need Your Help

CSS - Keep divs in columns aligned

css html alignment

I tried searching for what I was looking for, but I kept on finding things for css on internal divs.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.