旋转 iPhone 时出现黑色边框角
我的应用程序是横向的,仅对根视图控制器的 shouldAutorotateToInterfaceOrientation 中的 UIInterfaceOrientationLandscapeRight 返回 true 称呼。
但是当我旋转设备时 纵向和背面,我有时会看到黑色角旋转,就好像显示屏周围的厚黑框正在旋转,并且在角上 50 像素左右可见。
知道这是什么或如何解决它吗?
My app is landscape and returns true only for UIInterfaceOrientationLandscapeRight in the root view controller's shouldAutorotateToInterfaceOrientation
call.
However when I rotate the device
to portrait and back, I sometime see black corners rotate through as if a thick black frame around the display is rotating and just visible on the corner 50 pixels or so.
Any idea what this is or how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iPhone 上的动画本质上是通过在每次绘制到内部存储的位图中时缓存屏幕的外观来工作的。当屏幕旋转、翻转等时,动画中实际上使用的是这些缓存的图像,并且在动画完成之前屏幕本身不会重绘。
如果您在屏幕周围看到黑色边框,可能是因为您正在绘制边框。但是,您可能只是描述任何应用程序的正常旋转动画 - 旋转时,旋转图像/缓存视图后面会显示黑色背景,因为在旋转过程中,有些点旋转的正方形无法填充屏幕到角落。据我所知,这种黑色背景是苹果公司做出的设计决定,开发者没有办法改变颜色。
The animation on the iphone essentially works by caching the look of the screen each time it's drawn into internally stored bitmaps. When the screen rotates, flips etc. it is actually these cached images which are used in the animation, and the screen itself is not redrawn until the animation is finished.
If you're seeing a black border around your screen, it might be because you're drawing one. However, you may just be describing the normal rotation animation of any app - there is a black background displayed behind the rotated image/cached view as it rotates, because during the rotation there are points where the rotating square shape can't fill the screen to the corners. This black background, as far as I know, is a design decision made by Apple and there isn't a way for developers to change the color.