Pregunta

I am having an issue with "autorotation". I have AutoLayout constraints that function correctly if the phone is rotated from Portrait to Landscape Left or Landscape Right. But if the phone is rotated from either landscape orientation to the other landscape orientation but going "360 degrees" instead of back into portrait first, then the layout looks like it thinks the phone is in Portrait Orientation.

I'm allowing all orientation except upside down. I've tried enabling upside-down orientation but the phone never rotates into that orientation, it just stays in landscape.

What is the appropriate way to deal with this?

¿Fue útil?

Solución

I abandoned the approach using AutoLayout and instead used UIView + NSAutoLayout. This let me easily set all the constraints programmatically and everything worked much better.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top