SWIFT 3线程1:EXC_BAD_INSTRUCTION(代码= EXC_1386_INVOP,子代码= 0 * 0)

时间:2017-07-21 17:04:03

标签: arrays swift dictionary exc-bad-instruction

let roupa1: [String: String] = ["ID": "H1", "Descricao": "Roupa bacana!", "Preco": "40$"]
var roupasArray = [Dictionary<String, String>()]
roupasArray.append(roupa1)

UserDefaults.standard.set(roupasArray, forKey: "Roupas")

if let objecto = UserDefaults.standard.object(forKey: "Roupas") as? Array<Dictionary<String, String>>{
    lbtest.text = (objecto[0]["ID"])
}

有人能帮助我吗?我是swift 3.0的新手,无处不在但无法找到解决方案

0 个答案:

没有答案