我正在尝试设置一个MultipleSelectorRow
,它具有从Web服务检索的选项。我可以更改该行的displayValueFor,但是我需要从呈现的视图控制器中的数组中更改单元格的显示值,该在哪里设置该值?
我正在使用.onPresent
行方法,但是找不到应该设置哪个属性
<<< MultipleSelectorRow<Int>() {
$0.title = "Technologies"
$0.options = [0,1,2,3,4]
$0.value = [0]
$0.tag = "selectedTechnologies"
$0.displayValueFor = {
(set: Set<Int>?) in
var labels = ""
set?.forEach({ (val) in
labels += self.test[val]+","
})
if(labels.count > 0){
labels = String(labels[..<labels.index(labels.endIndex, offsetBy: -1)])
}
return labels
}
$0.onPresent({ (controller, rowcontroller) in
rowcontroller.selectableRowSetup = {
$0.displayValueFor = {
(val: Int?) in
print(val)
return ""
//return self.test[val!]
}
}
})
}