Swift 3.0如何使用startDeviceMotionUpdates(to:withHandler)? [英] Swift 3.0 how to use startDeviceMotionUpdates(to: withHandler)?
本文介绍了Swift 3.0如何使用startDeviceMotionUpdates(to:withHandler)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Swift 3.0与Xcode 8.0一起发布,显然发生了很多变化.我很快不熟悉新语法.有人可以帮我吗?我正在尝试弄清楚到底是怎么回事
Swift 3.0 was released alongside Xcode 8.0 and apparently a lot has changed. I'm very unfamiliar with the new syntax in swift. Can someone help me out? I'm trying to figure out what goes in
motionManager.startDeviceMotionUpdates(
to: OperationQueue.current()!,
withHandler: )
"withHandler:"之后
after the "withHandler:"
我正在尝试使我的SceneKit程序能够利用加速度计来确定SCNNode平台的方向.我也是新手,很快(大约需要花5天的时间在Swift中进行编程),所以如果有一些基本问题我要弄乱了,请告诉我.
I am trying to get my SceneKit program be able to utilize the accelerometer to determine the orientation of an SCNNode platform. I am also fairly new to swift (about 5 days into programming in Swift) so if there's something fundamental I am messing up, let me know.
推荐答案
查看全文