Ios swift – CoreMotion and how to update a reference CMAttitude?
I am implementing a custom UIView that listens to the device attitude in order to transform the view in 3d. The following implementation works well: class MyView: UIView { private let motionManager = CMMotionManager() private var referenceAttitude: CMAttitude? private let…