let cell = UITableViewCell()
let dic = dict as Dictionary
let z = "Period \(String(Int(indexPath.row + 1)))" // something wrong with this
let x: Array = dic[z] as! Array
if (x[0] is String) {
cell.textLabel?.text = x[0] as? String
} else {
print("Error: it isnt a string")
}
tableView.reloadData()
return cell
这有什么问题我觉得它是简单的东西,但我只是不能看到它,如果你能看到你能帮我!谢谢。编译时间错误
当我运行这个我得到一个分段错误,我已经缩小到这个代码。再次请帮助。 ; - ;
使用调试器并将问题缩小到确切的一行。 – rmaddy
你的标题中提到的编译时错误是什么?你的问题的主体似乎是关于运行时错误。 – rmaddy
@rmaddy我已经完成了我下面的那个人告诉我要做的事情,然后它会在x:Array = dic [z]这行上写上“成员'下标'的歧义引用'”!阵列 – KyleThe1st