Вопрос

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