项目介绍:
JNAPushPopCompletionBlock
Synopsis
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)];
Usages
Check out the demo app for an example.
Add UINavigationController+JNAPushPopCompletionBlock.h
and UINavigationController+JNAPushPopCompletionBlock.m
to your project.
#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.
}];