2

如果选择“其他”,如何取消选择所有选定的选项?

let fruits = ["Apple", "Banana", "Guava", "Others"]

form +++= SelectableSection<ImageCheckRow<String>, String>("fruits_section", selectionType: SelectionType.MultipleSelection) { section in
section.header = HeaderFooterView(title: "What is your favorite fruit ?")
}

for fruit in fruits {
    form.last! <<< ImageCheckRow<String>(fruit) { lrow in
        lrow.title = fruit
        lrow.selectableValue = fruit
    }
}
4

0 回答 0