【发布时间】:2014-09-22 11:24:57
【问题描述】:
我一直在尝试对文档中指定的 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 扩展问题的提示吗?
【问题讨论】: