Slide 28
Slide 28 text
σόΠεͷϞʔγϣϯΛर͏
ͨΊͷϋϯυϥΛొ͢Δ
let motionManager = CMMotionManager()
motionManager.deviceMotionUpdateInterval = 1.0 / 50 // 50hz
motionManager.startDeviceMotionUpdates(to: queue)
{ (deviceMotion: CMDeviceMotion?, error: Error?) in
if deviceMotion != nil {
self.processDeviceMotion(deviceMotion!)
}
}