Skip to content

Instantly share code, notes, and snippets.

@mafigit
Created January 14, 2016 17:27
Show Gist options
  • Save mafigit/abb77b57ce2c79c267be to your computer and use it in GitHub Desktop.
Save mafigit/abb77b57ce2c79c267be to your computer and use it in GitHub Desktop.
<<< MultipleSelectorRow<String>() {
let values = appliance.tags!.map(processTagValues)
print(values)
let options = tags.map(processTagOptions)
$0.title = "Tags"
//XXX needs to be a list fetched
$0.options = options
$0.value = Set(values)
$0.tag = "tags"
}.onChange { [weak self] row in
self!.dismissViewControllerAnimated(true, completion: nil)
self!.sendForm(self!.form, app: appliance)
}
}
func processTagOptions(tag: TagShow) -> String {
return String(tag.id!)
}
func processTagValues(tag: TagShow) -> String {
return String(tag.id!)
}
func sendForm(form: Form, app: ApplianceShow) {
print(form.values(includeHidden: true))
.....
.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment