iOS 修改tableview编辑模式下选中图片
作者:
旅途开发者 | 来源:发表于
2018-07-06 14:59 被阅读8次for (UIControl * control in self.subviews){
if ([control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]){
for (UIView * view in control.subviews){
if ([v isKindOfClass: [UIImageView class]]) {
UIImageView * imgView=(UIImageView *)view;
//这里是把图片修改为圆形
[imgView.layer setMasksToBounds:YES];
[imgView.layer setCornerRadius:(img.frame.size.height / 2)];
if (self.selected) {
//选中图片
imgView.image=[UIImage imageNamed:@"cellSelect"];
}else{
//未选中图片
imgView.image=[UIImage imageNamed:@"cellUnSelect"];
}
}
}
}
}
本文标题:iOS 修改tableview编辑模式下选中图片
本文链接:https://www.haomeiwen.com/subject/kitbuftx.html
网友评论