【发布时间】:2017-10-12 07:11:48
【问题描述】:
func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode? {
// Create and configure a node for the anchor added to the view's session.
let arrayOfImages = ["Photo1", "Photo2", "Photo3", "Photo4", "Photo5",
"Photo6", "Photo7", "Photo8", "Photo9", "Photo10",
"Photo11", "Photo12", "Photo13", "Photo14", "Photo15",
"Photo16", "Photo17", "Photo18", "Photo19", "Photo20",
"Photo21", "Photo22", "Photo23", "Photo24", "Photo25",
"Photo26", "Photo27", "Photo28", "Photo29", "Photo30"]
let node = SKSpriteNode(imageNamed: (arc4random() % UInt32 (arrayOfImages.count)) )
return node;
}
但它说一个错误:
错误:
//Can't convert value of type `UIImage` to expected argument type string.
【问题讨论】:
标签: arrays swift xcode augmented-reality arkit