Change default icon for moving cells in UITableView

前端 未结 11 1537
面向向阳花
面向向阳花 2020-11-28 21:46

I need to change default icon for moving cells in UITableView.

This one:

\"enter

11条回答
  •  -上瘾入骨i
    2020-11-28 22:15

    I use editingAccessoryView to replace reorder icon.

    1. Make a subclass of UITableViewCell.
    2. Override setEditing. Simply hide reorder control and set editingAccessoryView to an uiimageview with your re-order image.
     - (void) setEditing:(BOOL)editing animated:(BOOL)animated
    {
    
        [super setEditing: editing animated: YES];
    
        self.showsReorderControl = NO;
    
        self.editingAccessoryView = editing ? [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yourReorderIcon"]] : nil;
    
    }
    

    If you are not using editing accessory view, this may be a good choice.

提交回复
热议问题