uitableview - How to subClass UITableViewCell and use it to not clear UILabel background color on UITabeViewCell selected? -
in app, use label display specified color set background color in customized uitableviewcell
(because color maybe changed according incoming data internet), after viewdidload, ok, when cell selected (highlighted) color cleared.
after searching, found out have subclass uitableviewcell
, overwrite sethighlight
method not clear label background color. have tried unlucky.
so know how this? right way subclass uitableviewcell
, use in uitableviewcontroller
not clear label background color? please me.
thanks advice.
from latest uitableviewcell
documentation:
note: if want change background color of cell (by setting background color of cell via backgroundcolor property declared uiview) must in tableview:willdisplaycell:forrowatindexpath: method of delegate , not in tableview:cellforrowatindexpath: of data source. changes background colors of cells in group-style table view has effect in ios 3.0 different previous versions of operating system. affects area inside rounded rectangle instead of area outside of it.
also, review table view programming guide ios of best documentation.
Comments
Post a Comment