How do I lock from rotating screen, I want my app extension to be only in portrait mode. When I'm using my extension inside Photos my I can rotate the screen to landscape.
thanks
How do I lock from rotating screen, I want my app extension to be only in portrait mode. When I'm using my extension inside Photos my I can rotate the screen to landscape.
thanks
You have to choice:
1- Set landscape and portrait as supported interface orientation in the project, and then for each ViewController, you will override the supported interface orientation;
2- Set only portrait mode in the project, and in the ViewController you need it, you can make a 90 degree rotation
EDIT: so you can do this. Set your controller as observer for the keyPath
UIDeviceOrientationDidChangeNotification
. Then: