UITableViewCellReorderControl 改变默认图片

方法一:改在Controller里面

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (self.tableView.editing)
    {
        for (UIView * view in cell.subviews)
        {
            if ([NSStringFromClass([view class]) rangeOfString: @"UITableViewCellReorderControl"].location != NSNotFound)
            {
                for (UIView * subview in view.subviews) {
                    if ([subview isKindOfClass: [UIImageView class]])
                    {
                        ((UIImageView *)subview).image = [UIImage imageNamed: @"accessory_next"];
                    }
                }
            }
        }
    }
}

方法二:改在UITableViewCell里面

  - (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: @"yourimage.png"];
                    }
                }
            }
        }
    }   
}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。