单击提交按钮后从 ortuman/SwiftForms 检索数据

问题描述 投票:0回答:1

我在提交按钮上使用来自 cocopods ortuman/SwiftForms 的 Pod,它以这种格式提供数据

{
    company = test;
    email = test;
    interst = M;
    location = test;
    name = test;
    phone = 8765;
    picker = E;
    position = test;
    textview = test;
    website = test;
}

我无法从中提取任何数据,比如公司是关键,然后测试是价值,即如果我不输入任何内容,它会返回数据,那么我想要什么

{
    company = "<null>";
    email = "<null>";
    interst = M;
    location = "<null>";
    name = "<null>";
    phone = "<null>";
    picker = E;
    position = "<null>";
    textview = "<null>";
    website = "<null>";
}
ios swift cocoapods
1个回答
0
投票
for (key, value) in self.form.formValues() {
    println("\(key) = \(value)")
}

if let company = self.form.formValues()["company"] as? String {
            println(company)
}
© www.soinside.com 2019 - 2024. All rights reserved.