【问题标题】:Using NSLayoutConstraint extension causes SourceKitService crash使用 NSLayoutConstraint 扩展会导致 SourceKitService 崩溃
【发布时间】: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 扩展问题的提示吗?

【问题讨论】:

    标签: ios swift


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2012-08-07
      • 1970-01-01
      • 1970-01-01
      • 2014-12-01
      • 2013-11-03
      • 1970-01-01
      • 1970-01-01
      • 2019-05-01
      • 1970-01-01
      相关资源
      最近更新 更多