In my app, I use a label to display a specified color by set background color in a customized UITableViewCell
(because this color maybe changed according incoming data from internet), after viewDidLoad, everything is ok, but when this cell is selected (highlighted) the color is cleared.
After searching, I found out that some someone have to subclass UITableViewCell
and overwrite setHighlight
method to not clear label background color. I have tried but unlucky.
So Does anybody know how to do this? the right way to subclass UITableViewCell
, then use it in UITableViewController
to not clear label background color? Please help me.
Thanks for any advice.