in TableView, when the cell is in hightlighted (highlighted) or selected (checked) state, the background color of the child controls on the cell is Clear.
Solution: (4 kinds)
1. Directly set the background color of the layer of the child control, the layer will not be affected
2. Override the method to perform
-(void) sethighlighted: (BOOL) highlighted animated: (BOOL) animated{
[Super sethighlighted:highlighted animated:animated];
Set child control color again
}
-(void) setselected: (BOOL) selected animated: (bool) Animated {
[Super setselected:selected animated:animated];
Set child control color again
}
3. Child controls inherit the parent class, overriding the SetBackgroundColor method, doing nothing,
Rewrite a method to set the background color, execute [super Setbackgroundcolor:color];
4. Set the background image to
UITableViewCell the background color of the child view is clear when selected