Skip to content

Instantly share code, notes, and snippets.

@idevsoftware
Created March 25, 2014 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idevsoftware/9754057 to your computer and use it in GitHub Desktop.
Save idevsoftware/9754057 to your computer and use it in GitHub Desktop.
- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item {
// ...
if(shouldPop) {
dispatch_async(dispatch_get_main_queue(), ^{
[self popViewControllerAnimated:YES];
});
} else {
for(UIView *subview in [navigationBar subviews])
if(subview.alpha < 1)
[UIView animateWithDuration:.25
animations:^{
subview.alpha = 1.;
}
];
}
return NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment