旋转视图不会旋转音量按钮图标(Rotated view doesn't rotate the volume button icon)

我有一个以横向模式播放的OpenGL游戏,当用户旋转手机时,我通过UIDeviceOrientationDidChangeNotification获得一条消息,并且我将所有图形上下颠倒(通过opengl变换和旋转)。

一切都很好,除了当玩家按下音量按钮时,在UIDeviceOrientationLandscapeLeft中显示音量的图标是颠倒的。

我是否需要告诉UIView或操作系统它也被旋转了? 看起来很奇怪,因为我收到通知它首先从操作系统旋转。

I have a OpenGL game that plays in landscape mode, when the use rotates the phone, I get a message via UIDeviceOrientationDidChangeNotification and I render all my graphics upside down (via opengl transforms and rotates).

Everything works great, except that when the player pushes the volume buttons, the icon that comes up showing the volume is upside down when in UIDeviceOrientationLandscapeLeft.

Do I need to tell the UIView or the OS that it was rotated as well? Seems odd since I got the notification that it was rotated from the OS in the first place.

最满意答案

尝试设置应用程序的状态栏方向 ; 我认为这将告诉操作系统所有内容都需要以特定方向出现。

Try setting the application's status bar orientation; I think that will tell the OS that everything needs to appear in a particular orientation.

更多推荐