我有这个vc https://github.com/vlainvaldez/kwizapp/blob/master/kwizapp/Quiz/QuizCreator/QuizCreatorVC.swift
会为每个水平滚动生成一个单元格相同的单元格 https://github.com/vlainvaldez/kwizapp/blob/master/kwizapp/Quiz/QuizCreator/QuizCreatorCell.swift
我为每个称为测验的单元格传递了一个模型
cell.configure(with: self.quizes[indexPath.row])
https://github.com/vlainvaldez/kwizapp/blob/master/kwizapp/Models/Quiz.swift
我拥有的测验模型中
public let questionBehavior: BehaviorRelay<String> = BehaviorRelay<String>(value: "")
public let answerBehavior: BehaviorRelay<String> = BehaviorRelay<String>(value: "")
在单元格中的文本更改后将要输入的内容:QuizCreatorCell.swift
但是当我尝试下一次滚动时,请返回Im将文本视图设置为
self.questionTextView.text = quiz.questionBehavior.value
self.answerTextView.text = quiz.answerBehavior.value
我期望值仍然存在,但我什至没有使用引用类型的类