Swift: How to get form values using Eureka form builder?

后端 未结 1 1223
悲哀的现实
悲哀的现实 2020-12-20 09:36

I\'m building a form with the Eureka form builder but don\'t understand how I can get the values inside the form. They provide instructions in the docs here.

The for

相关标签:
1条回答
  • 2020-12-20 10:25

    I figured it out myself. It wasn't immediately clear to me that you need to set tags on the rows you want to retrieve the value from:

    <<< NameRow() {
        $0.tag = "NameRow"
        $0.title = "Name:"
        $0.value = "My name"
    }
    
    let dict = form.values(includeHidden: true)
    
    print(dict["NameRow"]) // Prints my name
    
    0 讨论(0)
提交回复
热议问题