Detect Device Rotation/Movement in iOS sdk

2019-06-14 17:41发布

问题:

I want to detect the device movement & Rotation just like when we are taking the Panorama Picture.

I want to move the Image same as the arrow while we capture Panorama Image.

There are many apps who uses this functionality but I can't able to find anything for this.

Help me to solve this.

Thank you,

回答1:

I think you need to use motion sensor in iphone ,But it wont give you the accurate result.

What motion does iPhone SDK give exactly?

But i am providing the motion sensor delegate methods code from this below link.

How do I detect when someone shakes an iPhone?

Verify this link you can have answer from this.