uitableview - iOS: UIView backgroundColor in table view -
so problem pretty weird , little difficult describe. have uitableview
each cell has image, , uiview
covering part of image. uiview
has it's background colour set 30% transparent white, giving appearance of washing out image beneath. there's labels , such on it. these views added single parent container view, added cell's contentview
. works fine - until try select cell. reason, whenever cell highlighted, backgroundcolor
property on each , every 1 of views set clear, until cell unhighlighted (at point old colour returns).
can explain why happens, , more important if there's way fix it? @ create single pixel image of white, turn uiview
uiimageview
, , set it's image pixel - that's inelegant @ best. suggestions?
when select cell, implementation of setselected:animated:
called , set background color of views included in cell transparent.
simply, can disable selection of cell setting selectionstyle
none:
cell.selectionstyle = uitableviewcellselectionstylenone;
or, if want use result of selection, can override setselected:animated:
method , reset background color of uiview
Comments
Post a Comment