ios - UITableView with scrolling background pattern -
i have uitableview backgroundcolor property set so:
tableview.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"image"]];
this gives tableview background, scrolls, want.
the problem is, when add cells tableview
, in each cell background pattern of tableview
starts new / starts over:
in above image, can see problem in red circled areas.
for tableview
cells, have set backgroundcolors
clearcolor
- backgroundview
- textlabel
- detailedtextlabel
- contentview
i have tried set
cell.backgroundview = [uiview new]; cell.backgroundview.backgroundcolor = [uicolor clearcolor];
and same contentview, too.
additional note: setting backgroundview of tableview not help, since background not scroll anymore!
just ran issue , found fixes cell having it's own copy of backgroundcolor
- (void)tableview:(uitableview *)tableview willdisplaycell:(uitableviewcell *)cell forrowatindexpath:(nsindexpath *)indexpath { [cell setbackgroundcolor:[uicolor clearcolor]]; }
Comments
Post a Comment