Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to judge the orientation of iPhone after success call back #4

Open
rahulsemwal opened this issue Oct 12, 2016 · 3 comments
Open

Comments

@rahulsemwal
Copy link

After success call back I got different kind of orientation objects and
and I want to check whether the iPhone is in landscape or portrait orientation currently.
success call back is below:

Orientation {x: 0.02584065205703885, y: -0.3507689419159716, z: -0.1126170930161808, timestamp: 1476258447743.268}

@gutosantos82
Copy link

I guess accelerometer data will give you a better idea. The accelerometer is affected by gravity so the axis with a value close to 9/-9 is the one in which the device is pointing up/down, respectively.

@NeoLSN
Copy link
Owner

NeoLSN commented Dec 6, 2016

@rahulsemwal
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants