iphone自动旋转黑色背景
我使用 OpenGLView 来显示应用程序的内容,但有时我必须显示 UIActionSheet。 我的应用程序适用于横向和纵向模式,但由于它是 OpenGL 视图,我自己处理视图的旋转,因此为了显示 UIActionSheet,我使用空视图并向其中添加操作表。问题是,当我使用 shouldAutorotateToInterfaceOrientation 时,一切正常,但旋转动画(屏幕边缘的黑色背景)在视觉上与应用程序的其余部分不匹配。 有没有办法改变背景或关闭动画(将时间设置为0?)但仍然让操作系统处理视图的旋转?
I use OpenGLView to display content of my app but sometimes I have to display UIActionSheet.
My application works on both - landscape and portrait mode - but since it's OpenGL view I handle rotation of the view by myself so to display UIActionSheet I use empty view and add actionsheet to it. the problem is that when I use shouldAutorotateToInterfaceOrientation everything works well but the animation of rotation (the black background on the edges of the screen) doesn't match visually to the rest of the application.
Is there a way to change that background or turn off the animation (set it's time to 0?) but still let the OS to handle the rotation of the view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这就是你的要求,这对我有用:
其中“blackColor”是你想要设置背景的颜色。
I think this is what your asking, and this is what works for me:
Where "blackColor" is the color you want to set the background.