【问题标题】:Xcode: Argument passed to call that takes no argumentsXcode:传递给不带参数的调用的参数
【发布时间】:2018-05-24 11:30:20
【问题描述】:

我目前正在开发一个应用程序,流星应该随机生成为敌人。我有这个代码:

let randomXStart = random(min: CGSize, max: CGSize)
let randomXEnd = random(min: CGSize, max: CGSize)

返回:

Argument passed to call that takes no arguments

我目前使用的是 xcode 9.3.1。

提前感谢您的帮助!

【问题讨论】:

    标签: xcode arguments cgsize


    【解决方案1】:

    我假设您正在编写 Swift 代码。 Swift 中没有 random() 方法。 如果要创建随机数,可以参考以下内容。

    How does one generate a random number in Apple's Swift language?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-20
      • 1970-01-01
      • 2021-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多