Ios 淡出和淡出具有tabbar控制器的整个屏幕
我的应用程序中有Ios 淡出和淡出具有tabbar控制器的整个屏幕,ios,objective-c,uinavigationcontroller,uianimation,Ios,Objective C,Uinavigationcontroller,Uianimation,我的应用程序中有tabbarController,这在整个应用程序中是一致的,并且我有相应的viewcontroller附加到tabbarItem,因此在其中一个viewcontroller1上,我有一个ClickMeButton在其单击上,我显示viewController2,在显示viewController2之前,我希望将整个屏幕淡出为白色,其中包括tabbarstatusBar,当动画结束时,我希望显示viewController2,当用户再次单击另一个按钮时,我希望淡入并关闭屏幕vie
tabbarController
,这在整个应用程序中是一致的,并且我有相应的viewcontroller
附加到tabbarItem
,因此在其中一个viewcontroller1
上,我有一个ClickMeButton
在其单击上,我显示viewController2
,在显示viewController2
之前,我希望将整个屏幕淡出为白色,其中包括tabbar
statusBar
,当动画结束时,我希望显示viewController2
,当用户再次单击另一个按钮时,我希望淡入并关闭屏幕viewcontroller
提前谢谢。
我在动画方面做得不多,请帮我解决这个问题。我做过这样的事情:
UIWindow *statusWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
statusWindow.windowLevel = UIWindowLevelStatusBar;
statusWindow.hidden = NO;
statusWindow.backgroundColor = [UIColor clearColor];
[statusWindow makeKeyAndVisible];
[UIView animateWithDuration:0.5f animations:^{
[statusWindow setBackgroundColor:[[UIColor whiteColor] colorWithAlphaComponent:1.0]];
} completion:^(BOOL finished){
statusWindow.backgroundColor = [UIColor clearColor];
[statusWindow release];
}];
我希望这对某人有所帮助。:-)