简体   繁体   English

旋转视图不会旋转音量按钮图标

[英]Rotated view doesn't rotate the volume button icon

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). 我有一个在横向模式下玩的OpenGL游戏,当用户旋转手机时,我通过UIDeviceOrientationDidChangeNotification收到一条消息,并颠倒了所有图形(通过opengl变换和旋转)。

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. 一切正常,除了当播放器按下音量按钮时,出现在UIDeviceOrientationLandscapeLeft中的显示音量的图标颠倒了。

Do I need to tell the UIView or the OS that it was rotated as well? 我是否需要告诉UIView或OS也是旋转的? 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. 我认为这将告诉OS,一切都必须以特定的方向出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM