By default there is a single line separator in uitableview.
But I want to put my customized line as a separator.
Is it possible? How?
Tested on iOS 7 (GM):
@implementation MyTableViewController
- (void)viewDidLayoutSubviews {
for (UIView *view in self.view.subviews) {
if ([view isKindOfClass:NSClassFromString(@"_UITableViewCellSeparatorView")])
view.backgroundColor = [UIColor redColor];
}
}
@end
NOTE: it appears the UITableView moves separators to the cells in some configurations, which would make this code not work unless you descend into all UITableViewCells as well.