Completion block for
[self.navigationController pushViewController:(nonnull UIViewController *) animated:(BOOL)]and
[self.navigationController popViewControllerAnimated:(BOOL)];
[self.navigationController popToViewController:(nonnull UIViewController *) animated:(BOOL)];
[self.navigationController popToRootViewControllerAnimated:(BOOL)];pod 'JNAPushPopCompletionBlock'Add
- UINavigationController+JNAPushPopCompletionBlock.h
- UINavigationController+JNAPushPopCompletionBlock.m
to your project.
Check out the demo app for an example.
#import "UINavigationController+JNAPushPopCompletionBlock.h"
---------
[self.navigationController pushViewController:viewController animated:YES completion:^{
// Add code here.
}];
[self.navigationController popViewControllerAnimated:YES completion:^{
// Add code here.
}];
[self.navigationController popToViewController:viewController animated:YES completion:^{
// Add code here.
}];
[self.navigationController popToRootViewControllerAnimated:YES completion:^{
// Add code here.
}];JNAPushPopCompletionBlock is available under MIT license. See the LICENSE file for more info.