Reutilizar la celda no funciona bien - TableView

Tengo un problema con el botón de mi celular. En mi tableView, cada fila está compuesta por: una imagen, algunas etiquetas y un botón. El botón tiene una imagen de marca de verificación. Cuando se hace clic, la imagen del botón cambia. El problema es que también la imagen de otro botón cambia sin razón. Este error ocurre porque mi celda se reutiliza.

He intentado usarprepareForReuse método en TableViewCell pero no pasa nada. También he intentado conselectedRowAt Pero no tuve ningún resultado. Por favor, ayúdame.

Imagen 1:

Imagen 2:

Esta es mi función en micustom Cell:

  override func prepareForReuse() {
    if checkStr == "uncheck"{
        self.checkBook.setImage(uncheck, for: .normal)
    } else if checkStr == "check"{
        self.checkBook.setImage(check, for: .normal)
    }
}

func isPressed(){
    let uncheck = UIImage(named:"uncheck")
    let check = UIImage(named: "check")
    if self.checkBook.currentImage == uncheck{
        checkStr == "check"
    } else self.checkBook.currentImage == check{
        checkStr == "uncheck"
    }
}

En mitableView:

  override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    let selectedCell: ListPropertyUserCell = tableView.cellForRow(at: indexPath) as! ListPropertyUserCell
    let uncheck = UIImage(named:"uncheck")
    let check = UIImage(named: "check")
    if selectedCell.checkBook.imageView?.image == uncheck{
        selectedCell.checkStr = "check"
    } else if selectedCell.checkBook.imageView?.image == check{
        selectedCell.checkStr = "uncheck"
    }
}

Respuestas a la pregunta(5)

Su respuesta a la pregunta