To detect the orientation of the phone when taking a picture I use
orientation == UIDeviceOrientationLandscapeRight
orientation == UIDeviceOrientationPortraitUpsideDown
orientation == UIDeviceOrientationPortrait
orientation == UIDeviceOrientationLandscapeLeft
But these work if the picture is being taken from the side. How do I check whether the iPhone is tilted downwards to be flat e.g. when taking an aerial picture?