开发者

Issue with custom tableviewcell imageview and accessory view

开发者 https://www.devze.com 2023-04-10 05:11 出处:网络
I\'m using customized tableviewcell and adding image view to the cell.When I\'m trying to add accessory discloser indicator to that cell,the 开发者_StackOverflow中文版accessory view\'s background is c

I'm using customized tableviewcell and adding image view to the cell. When I'm trying to add accessory discloser indicator to that cell, the 开发者_StackOverflow中文版accessory view's background is changing to gray color(which is default).

Please see this image

Issue with custom tableviewcell imageview and accessory view

Can any one tell the solution for this??


Set the background colour of the cell in tableView:willDisplayCell:forRowAtIndexPath:, e.g.:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
        cell.backgroundColor = [UIColor blueColor];
}


You can set the default color or any color you want:

cell.backgroundColor=[UIColor clearColor];

(or)

cell.backgroundColor=[UIColor blueColor];
0

精彩评论

暂无评论...
验证码 换一张
取 消