-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
[super setHighlighted:highlighted animated:animated];
if (highlighted) {
for (UIView *v1 in self.subviews) {
NSLog(@"cell.subview---%@", v1);
if ([v1 isKindOfClass:[UIControl class]]) {
for (UIView *v2 in v1.subviews) {
//NSLog(@"UITableViewCellEditControl.subview---%@", v2);
if ([v2 isKindOfClass:[UIImageView class]]) {
UIImageView *imageView = (UIImageView *)v2;
// imageView.tag = KTagValue;
imageView.image = [UIImage imageNamed:@"选中对勾"];
}
}
}
}
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
if (selected) {
for (UIView *v1 in self.subviews) {
NSLog(@"cell.subview---%@", v1);
if ([v1 isKindOfClass:[UIControl class]]) {
for (UIView *v2 in v1.subviews) {
//NSLog(@"UITableViewCellEditControl.subview---%@", v2);
if ([v2 isKindOfClass:[UIImageView class]]) {
UIImageView *imageView = (UIImageView *)v2;
// imageView.tag = KTagValue;
imageView.image = [UIImage imageNamed:@"选中对勾"];
}
}
}
}
}
}
转载于:https://my.oschina.net/u/2430056/blog/524164