Can anyone tell me the UIColor name or exact RGBA for the default iPhone UITableView separator?
It looks like a light gray color, but it\'s not [UIColor lightGrayC
FWIW:
UIColor *defaultSeparatorColor = [UIColor colorWithRed:0.783922f green:0.783922f blue:0.8f alpha:1.0f];
This was found simulating iOS 9.0 -- and logging out the floating point values that a UITableView separatorColor has by default. I do not find that this matches any of the values from the other answers, but rather exacts the result of the code in the other answer here where the separatorColor is set via creation of a UITableView *tempTable.
[UIColor colorWithRed:224/255.0 green:224/255.0 blue:224/255.0 alpha:1.0];
Swift 3
Just set to nil to revert to default.
tableView.separatorColor = nil
Screenshot -> Photoshop -> Pick Color Tool -> RGB(227, 227, 229)
R: 224 G: 224 B: 224
I hope that helps!
… in terms of CGContextSetRGBStrokeColor
it should be:
CGContextSetRGBStrokeColor (
CGContextRef c,
224.0/255.0,
224.0/255.0,
224.0/255.0,
CGFloat alpha
);
Quite simple and hopefully a solution for your problem.