I've searched and cannot find an answer that addresses this particular issue.
I'm using Eureka in Swift 4.1 and want to store these values into another array.
How can I get the values selected here?
MultivaluedSection(multivaluedOptions: [.Insert, .Delete],
header: "Primary Instrument") {
$0.tag = "instruments"
$0.multivaluedRowToInsertAt = { _ in
ActionSheetRow<String> {
$0.title = "Tap to Select"
$0.options = ["Vocals", "Guitar", "Bass", "Keyboards", "Ukelele"]
}
}
$0 <<< ActionSheetRow<String> {
$0.title = "Tap to Select"
$0.options = ["Vocals", "Guitar", "Bass", "Keyboards", "Ukelele"]
}
}
The following method does not work for MultivaluedSection:
if let items = self.form.rowBy(tag: "instruments") as? MultivaluedSection
{
print(items.values())
}
I always did it like this:
let values: [String]? = (form.sectionBy(tag: "instructions")?.flatMap { ($0 as? ActionSheetRow<String>)?.value })
Basically,
ActionSheetRow<String>