我想通过Eureka ActionSheet行显示所有可能选项的列表。但是,我希望在实现该功能之前始终禁用其中一个选项。我正在努力如何通过Eureka ActionSheet回调修改单个选项。到目前为止,我尝试过的所有操作(例如cellUpdate,cellSetup和onPresent)都只允许我修改实际的ActionSheet Eureka行,但无法访问修改ActionSheet中显示的行之一。有什么想法吗?
let options: [NameValueDTO] =
[NameValueDTO(name: "Link New", value: "N", group: nil),
NameValueDTO(name: "Link Existing", value: "E", group: nil)]
ActionSheetRow<NameValueDTO>("site") {
$0.title = "Link Site"
$0.options = options
$0.value = nil
$0.displayValueFor = { (value: NameValueDTO?) in
value?.name
}
$0.cellUpdate { cell, row in
if row.value?.value == "E" {
row.disabled = true
}
}
}