How do I control the background color during the iPhone flip view animation transition?

后端 未结 2 542
名媛妹妹
名媛妹妹 2021-02-07 14:19

I have some pretty standard flipping action going on:

[UIView beginAnimations:@\"swapScreens\" context:nil];
[UIView setAnimationTransition:UIViewAnimationTransi         


        
相关标签:
2条回答
  • 2021-02-07 14:45

    You could use a color or an image. You can add a view to do it:

    UIWindow *window = [appDelegate window];
    UIView *bgView = [[UIView alloc] init];
    [bgView setBackgroundColor:[UIColor blackColor]];
    [window addSubView:bgView];
    

    Or set the background color on the window directly:

    [[appDelegate window] setBackgroundColor:[UIColor blackColor]];
    
    0 讨论(0)
  • 2021-02-07 14:59

    You can also set the background color on the Window in MainWindow.xib in IB if that's easier.

    0 讨论(0)
提交回复
热议问题