Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在开发一个应用程序,流星应该随机生成为敌人。我有这个代码:
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。
提前感谢您的帮助!
我假设您正在编写 Swift 代码。Swift中没有random()方法。如果要创建随机数,可以参考以下内容。
random()
如何在 Apple 的 Swift 语言中生成随机数?