objective c - Determine when iPhone is on its back -
is there anyway determine when iphone on back?
this on surface or user holding in hands , shifts phone laying flat in mid-air.
i know iphone has gyro , accelerometer not sure how can used find out.
have @ uideviceorientation:
typedef ns_enum(nsinteger, uideviceorientation) { uideviceorientationunknown, uideviceorientationportrait, // device oriented vertically, home button on bottom uideviceorientationportraitupsidedown, // device oriented vertically, home button on top uideviceorientationlandscapeleft, // device oriented horizontally, home button on right uideviceorientationlandscaperight, // device oriented horizontally, home button on left uideviceorientationfaceup, // device oriented flat, face uideviceorientationfacedown // device oriented flat, face down };
Comments
Post a Comment