swift -> 解决代码提示显示慢的问题

** 应该是 BUG 问题, 如下

let search_bar_box = UIView(frame: CGRect(x: 10, y: 10, width: screenWidth-boxMargin*2-10*2, height: 80-10*2));

如果改成

let search_bar_box = UIView(frame: CGRect(x: 10, y: 10, width: 80, height: 60));

或者 ,将 width 和 height 先定义为变量 

let width = screenWidth-boxMargin*2-10*2;
let search_bar_box = UIView(frame: CGRect(x: 10, y: 10, width: width, height: 80-10*2));

都会解决 该问题。  

其他可参考 : http://www.cnblogs.com/markstray/p/5563131.html

1. cd进入~/Library/Developer/Xcode/DerivedData
2. ls一下
3. 找到你的项目所用的目录(一般以你的项目名开头)
4. cd 目录名
5. rm -r Index 删除掉你的项目所用的索引文件夹

猜你喜欢

转载自mft.iteye.com/blog/2376698
今日推荐