#pragma mark - 隐藏tabbar动画
- (void)viewWillAppear:(BOOL)animated
{
UIWindow * window = [UIApplication sharedApplication].keyWindow;
YZHTabBarController * tabbar =(YZHTabBarController *) window.rootViewController;
[UIView animateWithDuration:0.5 animations:^{
tabbar.customTabBar.alpha = 0.0;
tabbar.customTabBar.hidden = YES;
} completion:^(BOOL finished) {
}];
UIWindow * window = [UIApplication sharedApplication].keyWindow;
YZHTabBarController * tabbar =(YZHTabBarController *) window.rootViewController;
[UIView animateWithDuration:0.5 animations:^{
tabbar.customTabBar.alpha = 1.0;
tabbar.customTabBar.hidden = NO;
} completion:^(BOOL finished) {
}];
}
- (void)viewWillAppear:(BOOL)animated
{
UIWindow * window = [UIApplication sharedApplication].keyWindow;
YZHTabBarController * tabbar =(YZHTabBarController *) window.rootViewController;
[UIView animateWithDuration:0.5 animations:^{
tabbar.customTabBar.alpha = 0.0;
tabbar.customTabBar.hidden = YES;
} completion:^(BOOL finished) {
}];
}
#pragma mark - 显示动画
UIWindow * window = [UIApplication sharedApplication].keyWindow;
YZHTabBarController * tabbar =(YZHTabBarController *) window.rootViewController;
[UIView animateWithDuration:0.5 animations:^{
tabbar.customTabBar.alpha = 1.0;
tabbar.customTabBar.hidden = NO;
} completion:^(BOOL finished) {
}];
}