When is interfaceorientation set
Different phones, laptops or tablets can have different set of supported interface orientations. Use the Device Info patch to get the physical orientation of a connected device in angles. The interface orientation to be shown when the prototype starts or restarts. A boolean indicating whether the interface will rotate when device is rotated to the portrait orientation. A boolean indicating whether the interface will rotate when device is rotated to the left landscape orientation.
I have sort of the same problem… I hava a pure portrait app… except when YouTube video is played. When it starts, I rotate the view, but the player control is a little bit dislocated and I still didn't manage to fix it. Hey russoedu, i just tested the app again. When i used the case 3 of your example so that the screen turns to landscape mode, the statusbar turns back to portrait when the device turns to any position and stays in portrait.
Where is exactly the problem? Do i have to insert something into "shouldAutoRotateToInterface" or anything else? Use this works perfectly on iOS7 and earlier. Alex Cio 5, 5 5 gold badges 40 40 silver badges 73 73 bronze badges.
Arpan Dixit Arpan Dixit 1 1 gold badge 12 12 silver badges 24 24 bronze badges. Crake Crake 1, 1 1 gold badge 13 13 silver badges 30 30 bronze badges. But now i let the "shouldAutoRotate In your "shouldAutoRotate" method, it should return true only if it is the desired orientation.
Otherwise, it will just turn back immediately, which might what you are seeing. Vyachaslav Gerchicov Vyachaslav Gerchicov 2, 3 3 gold badges 20 20 silver badges 44 44 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Active Oldest Votes.
You can use [UIApplication sharedApplication]. The docs: Discussion: The value of the property is a constant that indicates the current orientation of the device. I would check if the statusBarOrientation works. Improve this answer.
Portrait case. PortraitUpsideDown case. LandscapeLeft case. Anton Tropashko Anton Tropashko 4, 3 3 gold badges 32 32 silver badges 57 57 bronze badges. Hassy Hassy 4, 3 3 gold badges 33 33 silver badges 57 57 bronze badges. ErasmoOliveira ErasmoOliveira 1, 2 2 gold badges 19 19 silver badges 39 39 bronze badges.
No it is not. There is an ugly way that sucks that warranted a separate answer cause it's too large for a comment. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
0コメント