Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically change UITableView cell separator line color

Can anyone give sample code how to change the UITableView cell separator line color dynamically?

like image 808
Jayaraj Avatar asked Mar 29 '11 10:03

Jayaraj


1 Answers

i assumed asking about tableview seperator color

use switch to all color then like this u can

 [tableview setSeparatorColor:[UIColor grayColor]];

OR

Here R, G, B are float for different Color value.

 [tableview setSeparatorColor:[UIColor colorWithRed:R green:G blue:B alpha:1]];

Often I use this below code

 [tableview setSeparatorColor:[UIColor colorWithRed:190/255.0f green:195.0/255.0f blue:199.0/255.0f alpha:1]];
like image 116
Vijay-Apple-Dev.blogspot.com Avatar answered Oct 23 '22 13:10

Vijay-Apple-Dev.blogspot.com