Set height of delete button that appears on swipe in UITableViewCell

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

\"enterI have UITableViewCell as shown in figure below.

The cell occupy the h

5条回答
  •  长发绾君心
    2021-02-10 18:28

    For IOS 13 , the Position has been yet again change , not inside table view it is once again in _UITableViewCellSwipeContainerView . Thus you should iterate through that as well.Take a look below

    ([NSStringFromClass([subview class]) 
     isEqualToString:@"_UITableViewCellSwipeContainerView"]){
    
            for (UIView *deleteButtonSubview in subview.subviews){
    
                if ([NSStringFromClass([deleteButtonSubview class])
                     isEqualToString:@"UISwipeActionPullView"]) {
    
    
    
                    if ([NSStringFromClass([deleteButtonSubview.subviews[0] class]) isEqualToString:@"UISwipeActionStandardButton"]) {
    
                       //do what you want
                    }
                }
    
            }
        }
    

提交回复
热议问题