I would like to be able to handle orientation changes in my current iPhone application. The problem is that I don't want the view of my controller to rotate or resize. When the device orientation changes, I just want one UI element to rotate 90 degrees on the screen.
Apple's camera application is a perfect example of this - when the device orientation changes, all of the buttons rotate, but the view itself does not rotate.
I suppose that I could just resize the view, move all of my elements around, and then animate the buttons, but I feel like there must be an easier way to do it.
Thanks in advance.
Swipe down from the top-right corner of your screen to open Control Center. Tap the Portrait Orientation Lock button to make sure that it's off. Turn your iPhone sideways.
1) You can create 2 view hierarchies and change which is on screen in willRotateToInterfaceOrientation:
see this question
2) Or you can handle all rotations yourself see this question
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With