开发者

UIView transitionFromView: how can I do black background during transition?

I use next code.

[UIView transitionFromView:viewA toView:viewB duration:1.0 options: UIViewAnimationOptionTransitionFlipFromLeft
                        completion: ^(BOOL inFinished) {
                            viewB.hidden = NO;
                            viewA.hidden = YES;
                            //do any post animation actions here
                        }];

Transition works OK.开发者_JAVA技巧 I want to set a black background during transition. How can I do this? Please, see the photo:

UIView transitionFromView: how can I do black background during transition?


Try with setting the black background color for parent view of animated view.

viewB.superview.backgroundColor = [UIColor blackColor];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜