Black border corners when rotating iPhone
My app is landscape and returns true only for UIInterfaceOrientationLandscapeRight in the root view controller's shouldAutorotateToInterfaceOrientation call.
However when I rotate the d开发者_如何学Pythonevice 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?
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.
精彩评论