UITableViewCell delete button gets covered up

后端 未结 12 1898
闹比i
闹比i 2020-12-01 08:55

UPDATE:

Thanks to information from \"Evgeny S\" I\'ve been able to determine that what is covering up the delete button is the cell background. I had the following f

12条回答
  •  情深已故
    2020-12-01 09:12

    here is a better way just make sure you subclass UITableviewController for better performance and add this code

    - (void)setEditing:(BOOL)editing animated:(BOOL)animated {
    
    [super setEditing:editing animated:animated];
    
    CGRect frame = self.tableView.frame;
    
    if(editing){
        [self.tableView setFrame:CGRectMake(0, frame.origin.y, frame.size.width, frame.size.height)];
        //other codes to run if needed
    }else{
        [self.tableView setFrame:frame];
        //other codes to run if needed
    }
    

    }

提交回复
热议问题