I have a tableView with more than one section in it. For applying a color on each section’s outline I am using the following code in viewDidLoad:
[tableView setSeparatorColor: [UIColor blueColor]];
Now, I need to apply a customized color in the section outline for which i am using:
[tableView setSeparatorColor: [UIColor colorWithRed: r green: g blue: b alpha:1]];
But it shows white color instead. I am unable to use this customized color. Plz help!
o_O
Please, be sure that the
r,gandbvariable are floats in the range[0,1]. Then everything should work fine.Edit
To be able to use RGB values you should change your code this way:
so that you can set
r,gandbin the[0,255]range.