Skip to content

Completion Block for UINavigationController Push/Pop UIViewController

License

Notifications You must be signed in to change notification settings

JawadN00r/JNAPushPopCompletionBlock

Repository files navigation

JNAPushPopCompletionBlock

codebeat badge Build Status Cocoapod Platform License

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)];

Installation

Using Cocoapod

pod 'JNAPushPopCompletionBlock'

Manual

Add

to your project.

Usages

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.
}];

License

JNAPushPopCompletionBlock is available under MIT license. See the LICENSE file for more info.