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
如下代码:
修改为如下:
http://stackoverflow.com/questions/30730387/swift-2-0-enumerate-is-unavailable-call-the-enumerate-method-on-the-seq
查找原因如下,
如下代码:
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基础语法详解(一)
- Swift之贪婪的UIButton
- Swift中的NSKeyedArchiver使用
- Swift中的单例的实现方式
- Swift_基础部分
- Swift 2:可以使用 @NSManage 标记自动生成方法
- Swift 2.0学习笔记(Day 1)——我的第一行Swift代码
- Swift UIScrollView简单介绍
- Swift中自定义SubString
- 【iOS】Swift中扩展extension与协议protocol
- Swift Tutorial(swift 教程) 5:Making it Beautiful
- 关东升的《iOS实战:图形图像、动画和多媒体卷(Swift版)》上市了
- 关东升的《iOS实战:图形图像、动画和多媒体卷(Swift版)》上市了
- Swift UITabBarController 标签栏控制器
- Swift高阶函数:Map,Filter,Reduce等-Part 1
- 'String' does not conform to protocol 'CollectionType' Error in Swift 2.0
- swift selector 按钮点击事件
- Swift调用C/C++/OC语言桥接文件命名规则
- 仿QQ左侧抽屉 Swift编写
- Swift - 函数