Reputation: 317
What different kinds of things can you do to edit a tableview's appearance and how would you do them? For example, how would you change the color programmatically? Or change the navigation bar's color programmatically?
Upvotes: 2
Views: 4420
Reputation: 3195
If you want to change the appearance of all TableViews in your app you can define it with the Appearance property. In Monotouch you do something like this:
UITableView.Appearance.BackgroundColor = UIColor.Black;
UITableViewCell.Appearance.BackgroundColor = UIColor.Black;
In objective C it would be something similar.
Upvotes: 1
Reputation: 7963
[tableView setBackgroundColor:[UIColor grayColor]];
or You can use,
[tableView setBackgroundColor:[colorWithRed:.98 green:.98 blue:.82 alpha:1]];
Upvotes: 1
Reputation: 52738
Check out the docs for UITableView and UITableViewCell.
You probaby want to change the backgroundColor property or customize each cells contentView property. Also,look into layers, you can do things like make rounded corners, shadows, etc on a views layer.
Here is the QuartzCore Framework docs. They should be useful if your trying to change the appearance of a view.
Edit (good suggestion bshirley):
Upvotes: 3
Reputation: 14834
Check out Apple's doc on UITableView particularly the configuring A Table View section.
Upvotes: 1