您的位置:首页 > 移动开发 > Swift

Swift 2.0 : 'enumerate' is unavailable: call the 'enumerate()' method on the sequence

2015-09-16 11:04 459 查看
Swift 2.0 : 'enumerate' is unavailable: call the 'enumerate()' method on the sequence

如下代码:

for (index,cell) in enumerate(self.tableView.visibleCells){
if let acell = cell as? ChatCell {
acell.changeColor(self.isWhiteBackground)
}
}


修改为如下:

for (index,cell) in self.tableView.visibleCells.enumerate(){
if let acell = cell as? ChatCell {
acell.changeColor(self.isWhiteBackground)
}
}

http://stackoverflow.com/questions/30730387/swift-2-0-enumerate-is-unavailable-call-the-enumerate-method-on-the-seq
查找原因如下,
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: