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

后端 未结 2 543
名媛妹妹
名媛妹妹 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]];
    

提交回复
热议问题