Created
January 14, 2016 17:27
-
-
Save mafigit/abb77b57ce2c79c267be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<< 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