I am using a CMMotionManager object to retrieve a CMAcceleration vector that indicates the acceleration of the device. This vector is in device coordinates, independently of the orientation of the GUI, and therefore independent of the orientation of my UIView.
However, when drawing into my UIView, I would like to convert that acceleration vector into the coordinate system of my UIView. Previously, I would read the device interface orientation from [UIApplication statusBarOrientation], or get device orientation changes via the [UIViewController willRotateToInterfaceOrientation] messages.
However, Apple is deprecating both of these in favor of treating all device orientation changes as changes in the frames of UIView objects. So, how are we supposed to convert between the device coordinate system of CMAcceleration, to the interface orientation of our UIView? What is the correct way to do this now?