Domanda

What's the best way to control orientation changes when they happen too rapidly and overlap in time? In my application, I display a PDF document and scale it according to the current aspect ratio. It works OK if the new orientation changes occurs after the previous one completed. Otherwise, I seem to get an inconsistent state (e.g. portrait aspect ratio display in landscape mode).

Thank you,

Sam

È stato utile?

Soluzione

I don't know which event you are using your code in. If you are using -didRotateFromInterfaceOrientation or -willRotateToInterfaceOrientation it should work correctly. But if you are using the deviceoriention notification for this it can cause a lot of trouble.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top