tableview修改selectedBackgroundVie
作者:
锦鲤跃龙 | 来源:发表于
2017-11-13 14:08 被阅读0次
思路
- selectedBackgroundView的frame无法修改,但可以替换
- 在替换的view上加上view,并设置这个view的frame
代码
UIView* selectBackview = [[UIView alloc] init];
selectBackview.backgroundColor = [UIColor clearColor];
UIView* backview = [[UIView alloc] initWithFrame:cell.mainView.frame];
backview.backgroundColor = RGBAlphaColor(183,207,232,0.4);
[selectBackview addSubview:backview];
cell.selectedBackgroundView = selectBackview;
效果图

这里写图片描述
本文标题:tableview修改selectedBackgroundVie
本文链接:https://www.haomeiwen.com/subject/jjlzmxtx.html
网友评论