ios - How to set custom background color of UITableViewCell even there's no data inside -
i want accomplish : see there's 1 data but, background color continue until end. i understand can inside tableview delegate of tableview:willdisplaycell:forrowatindexpath: . doesn't go empty cell, hence empty cell white. i used following code display cell alternative color if cell not initialized.i have done work on scrollviewdidscroll showing below:-- - (void)scrollviewdidscroll:(uiscrollview *)scrollview { uiview *view=[[uiview alloc] initwithframe:tblview.frame]; view.backgroundcolor=[uicolor greencolor]; uiview *cellview; int y=0; int i=0; (uiview *view in tblview.subviews) { if ([nsstringfromclass([view class]) isequaltostring:@"_uitableviewseparatorview"]) { cellview=[[uiview alloc] initwithframe:cgrectmake(0, y, 320, 44)]; if (i%2==0) { cellview.backgroundcolor=[uicolor redcolor]; }else{ cellview.backgroundcolor=[uicolor greencolor]; ...