Skip to content

Instantly share code, notes, and snippets.

@BrunoVillanova
Created July 22, 2015 13:39
Show Gist options
  • Save BrunoVillanova/869b81f4dcd134f7cef4 to your computer and use it in GitHub Desktop.
Save BrunoVillanova/869b81f4dcd134f7cef4 to your computer and use it in GitHub Desktop.
- (void)showNavigationBar {
if (!navigationBarIsHidden) {
return;
}
[UINavigationBar beginAnimations:@"NavBarFadeIn" context:nil];
self.navigationController.navigationBar.alpha = 0;
UIColor *color = [UIColor blackColor];
NSMutableDictionary *titleTextAttributes = [self.navigationController.navigationBar.titleTextAttributes mutableCopy];
titleTextAttributes[NSForegroundColorAttributeName] = color;
self.navigationController.navigationBar.titleTextAttributes = titleTextAttributes;
[self.navigationController.navigationBar setBackgroundImage:nil
forBarMetrics:UIBarMetricsDefault];
// _closeBarButtonItem.tintColor = color;
[UINavigationBar setAnimationCurve:UIViewAnimationCurveEaseIn];
[UINavigationBar setAnimationDuration:0.3];
[UINavigationBar setAnimationTransition:UIViewAnimationTransitionNone
forView:self.navigationController.navigationBar
cache:YES];
self.navigationController.navigationBar.alpha = 1;
[UINavigationBar commitAnimations];
// [self changeNavigationBarTextColor:[UIColor whiteColor]];
// [UIView animateWithDuration:0.3 animations:^{
// _blurView.alpha = 1;
// }];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
navigationBarIsHidden = NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment