Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing border color in iPhone UITableView cells (non-grouped)

I've read (and used) the code here which illustrates how to change the background color and border color of a UITableViewCell in grouped mode on the iPhone. I'm writing an app now which has a non-grouped UITableView and I need to change the border color of the cells. I know that I can modify the code and create a new background view and apply it, but is it necessary?

Is there an easy way to specify the border color of a UITableViewCell if it is a non-grouped style?

like image 290
marcc Avatar asked Sep 10 '09 22:09

marcc


1 Answers

If by "border color" in a plain table view you mean the separator lines between the cells (default color gray), you can customize this color for the whole table view via:

tableView.separatorColor = [UIColor blueColor]; 

See the UITableView reference.

like image 172
Daniel Rinser Avatar answered Oct 08 '22 01:10

Daniel Rinser