Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 淡出和淡出具有tabbar控制器的整个屏幕_Ios_Objective C_Uinavigationcontroller_Uianimation - Fatal编程技术网

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];
        }];
我希望这对某人有所帮助。:-)