首页 > 编程语言 > 详细

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

时间:2015-09-16 12:44:44      阅读:1323      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!