使用NSLayoutConstraint扩展会导致SourceKitService崩溃

时间:2014-09-22 11:24:57

标签: ios swift

我一直在尝试使用文档中指定的NSLayoutConstraint的便利初始化 - https://developer.apple.com/library/prerelease/mac/documentation/AppKit/Reference/NSLayoutConstraint_Class/index.html#//apple_ref/occ/clm/NSLayoutConstraint/constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant

当我将代码粘贴到NSLayoutConstraint时,我开始接收:

SourceKitService crashed.

在针对类似问题研究Stack Overflow之后,我发现问题很常见,并且当天没有找到解决方案: SourceKitService Terminated

当我尝试构建代码时,忽略代码没有语法高亮的事实,编译器返回:

Command failed due to signal: Segmentation fault:11

所以我跟着这个主角,发现有时候,在一个文件而不是单独的文件中加入扩展会有所帮助。它不是我的情况 Swift compiler segmentation fault when building

有人可以向我提供任何可以导致修复NSLayoutConstraint的Swift扩展程序问题的提示吗?

1 个答案:

答案 0 :(得分:0)

是。提交错误报告并等待Swift和Xcode团队解决问题。