排序的控制是一个UITableViewCellReorderControl,但它是一个私有的类,不能直接访问它,通过子视图的层次结构找到它的图片。在自定义cell里添加如下方法:
- (void) setEditing:(BOOL)editing animated:(BOOL)animated
{
[super setEditing: editing animated: YES];
if (editing) {
for (UIView * view in self.subviews) {
if ([NSStringFromClass([view class]) rangeOfString: @"Reorder"].location != NSNotFound) {
for (UIView * subview in view.subviews) {
if ([subview isKindOfClass: [UIImageView class]]) {
((UIImageView *)subview).image = [UIImage imageNamed: @"new.png"];
}
}
}
}
}
}