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?
I think this is what your asking, and this is what works for me:
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor blackColor];
}
Where "blackColor" is the color you want to set the background.
精彩评论