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"];
}
}
}
}
}
网友评论