gpt4 book ai didi

ios - iOS7 设备上的 SKEmitter 错误

转载 作者:行者123 更新时间:2023-11-28 09:46:55 26 4
gpt4 key购买 nike

我遇到了 SKEmitter 的问题。RainParticle.sks 是文件,这里是代码:

let rainParticle = SKEmitterNode(fileNamed: "RainParticle")

...

    rainParticle.position = CGPoint(x: size.width / 2, y: size.height + 10)
addChild(rainParticle)

它可以在模拟器上运行,但是当我在我的 Iphone 4s 上运行它时,它会抛出这个错误:

2014-11-01 21:31:33.227 AfraidGame[1541:60b] +[SKEmitterNode nodeWithFileNamed:]: unrecognized selector sent to class 0x38c0454c 2014-11-01 21:31:33.232 AfraidGame[1541:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SKEmitterNode nodeWithFileNamed:]: unrecognized selector sent to class 0x38c0454c'

nodeWithFileNamed - unrecognized selector?

谁能帮忙?

最佳答案

特别是 init(fileNamed:) 它只有 Available in iOS 8.0 and later.

关于ios - iOS7 设备上的 SKEmitter 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26693499/

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