gpt4 book ai didi

ios - Xcode 7.0 beta 4 未检测到 swift 2.0

转载 作者:行者123 更新时间:2023-11-28 18:56:05 25 4
gpt4 key购买 nike

我已经安装了 Xcode 7.0 beta 4 但是,我认为 Xcode 能够在我的代码中检测到 swift 2.0 函数

    let array = ["1", "2", "3"]
let stringRepresentation = array.joinWithSeparator("-")
print(stringRepresentation)

Xcode 显示错误“‘[String]’没有名为‘joinWithSeparator’的成员”,如下图所示

enter image description here

此外,当我在终端中运行“xcrun swift”时,它会显示

Welcome to Apple Swift version 2.0 (700.0.47.1 700.0.59.1). Type :help for assistance.
1>

我在这里被难住了,无法运行 swift 2.0 代码。

最佳答案

joinWithSeparator 出现在 Xcode beta 6 中。

关于ios - Xcode 7.0 beta 4 未检测到 swift 2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32522096/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com