开发者

iphone autorotation black background

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜