title: How to detect Camera Overlay view rotation
body: <p>I'm trying to make a camera overlay view on top of the camera accomodate according to the screen orientation. Since <strong>even if you lock your screen orientation on the settings, the camera still rotates its UI</strong> (the flash and camera buttons that are on the live preview), if I don't move the elements I have on the overlay view, it stays on top of those.</p>
  
  <p>I already accomplished this by registering to the <strong><code>UIDeviceOrientationDidChangeNotification</code></strong> notification, and then reading the value on <strong><code>[UIDevice currentDevice].orientation</code></strong> and setting the transform value of my camera overlay view.</p>
  
  <p>The problem with this is the <code>UIDeviceOrientationDidChangeNotification</code> notification doesn't fire when the user locks the interface on their iPhone (<em>but the camera keeps rotating</em>!).</p>
  
  <p>I've tried a number of alternatives, like registering to the <code>PLCameraDeviceOrientationChangedNotification</code> notification that I found being fired when registering myself as an observer for every notification, but it doesn't contain the orientation on the userInfo dictionary.
  I also tried setting up a <code>NSTimer</code> to fire every 0.5s and check the <code>[UIDevice currentDevice].orientation</code>, but it always reports UIDeviceOrientationPortrait when it's locked, regardless of the actual device orientation.</p>
  
  <p>Is there <strong>any way</strong> I can find out the orientation the camera is in, and ideally also be notified when it changes even with the interface orientation locked by the user?</p>
  
  <p>Thanks.</p>