iOS 10: UITableViewCell's delete button custom height

前端 未结 4 752
既然无缘
既然无缘 2021-01-15 04:44

Using custom UITableViewCell, I\'m trying to change the height of tableViewCell\'s delete button. I\'ve tried all the solutions available here on SO.

Everyone has me

4条回答
  •  滥情空心
    2021-01-15 05: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
                        }
                    }
    
                }
            }
    

提交回复
热议问题