How to tell if the iPhone is "face down" or "face up"?

Viewed 2127

I need to detect which direction the iPhone is facing so I can record from the non obstructed camera (Front or Back) when dropped.

This will be used in emergency situation and the phone is dropped, or placed in such a way that the active camera is recording nothing of value.

What API or technique can I use to determine this?

3 Answers
Related