码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-09-16 12:46:54      阅读:600      评论:0      收藏:0      [点我收藏+]

标签:

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

查找原因如下,技术分享

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

标签:

原文地址:http://www.cnblogs.com/741162830qq/p/4812652.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!