Определите в blackBGView
свой заголовок, затем вызовите следующий код в своем viewDidLoad
:
blackBGView = [[UIView alloc] init];
blackBGView.backgroundColor = [UIColor blackColor];
Тогда в cellForRowAtIndexPath:
вы можете позвонить:
cell.backgroundView = blackBGView;
Однако я не уверен, почему вы добавляете UIView в свою ячейку, когда вы можете просто позвонить:
- (void)tableView: (UITableView*)tableView
willDisplayCell: (UITableViewCell*)cell
forRowAtIndexPath: (NSIndexPath*)indexPath
{
cell.backgroundColor = [UIColor blackColor];
}