Set height of delete button that appears on swipe in UITableViewCell

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

\"enterI have UITableViewCell as shown in figure below.

The cell occupy the h

5条回答
  •  故里飘歌
    2021-02-10 18:29

    Use this code in your custom Cell class

     -(void) layoutSubviews
    {
        NSMutableArray *subviews = [self.subviews mutableCopy];
        UIView *subV = subviews[0];
        if ([NSStringFromClass([subV class])isEqualToString:@"UITableViewCellDeleteConfirmationView"]){
          [subviews removeObjectAtIndex:0];
          CGRect f = subV.frame;
          f.size.height = 106; // Here you set height of Delete button
          subV.frame = f;
         }
    

    }

提交回复
热议问题