我想在存储在postFromFriends数组中的tableview单元格上显示一些名称,但是当我编写下面所示的代码时,在声明名称常量时,我得到了一个错误信息:“Cannot subscript a valueof type 'String‘with a index of type 'String’”。如果有人会help.Thanx的话这是我用来追加名称的数组。String {
我从swift 2迁移到swift 3,在我的代码中,它给出了以下错误: Cannot subscript a value of type 'JSON' with an index of type '(key: String)' 和 Cannot subscript a value of type 'JSON' with an index of type '(index: Int)' 我的代码: fileprivatesubscript(sub: Subscri
这是在Swift2中工作的,但是现在在Swift3中(在自动转换之后),我得到了一个错误:Cannotsubscript a value of type 'JSON' with an index of type 'STRING'
Self.entry“调度器”等值是布尔值,但我认为问题在于索引、“调度器当然,我以完全相同的方式
我希望将数组的项赋值为索引,以便从另一个数组中获取值。textArray[indexArray[indexPath.row]]// here is an error Table View: Cannot subscript a value of type '[String]' with an index of type '[String]'
}
为了更好地解释,不要使用indexPath.row作为textArray的<