Set height of delete button that appears on swipe in UITableViewCell

后端 未结 5 763
独厮守ぢ
独厮守ぢ 2021-02-10 18:25

\"enterI have UITableViewCell as shown in figure below.

The cell occupy the h

5条回答
  •  北海茫月
    2021-02-10 18:47

    The best way to solve this was overriding

    -(void)layoutSubviews in YourCustomCell:UITableViewCell    
    

    then

    if ([NSStringFromClass([subview class])isEqualToString:@"UITableViewCellDeleteConfirmationControl"]){
                UIView *deleteButtonView = (UIView *)[subview.subviews objectAtIndex:0];
                                    CGRect buttonFrame = deleteButtonView.frame;
                                    buttonFrame.origin.x = Xvalue;
                                    buttonFrame.origin.y = Yvalue;
                                    buttonFrame.size.width = Width;
                                    buttonFrame.size.height = Height;
                                    deleteButtonView.frame = buttonFrame;
    
             }
    

提交回复
热议问题