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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top