This commit is contained in:
Pfeil, Scott Robert 2018-07-25 15:33:02 -04:00
parent 5a48811c5f
commit 6275e0e829

View File

@ -262,7 +262,7 @@
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
if ([keyPath isEqualToString:@"interactiveTransitionCanceled"]) {
[object removeObserver:self forKeyPath:@"interactiveTransitionCanceled"];
BOOL transitionCanceled = ((NSNumber*)change[NSKeyValueChangeNewKey]).boolValue;
BOOL transitionCanceled = ((NSNumber *)change[NSKeyValueChangeNewKey]).boolValue;
if (transitionCanceled) {
//When interactive transition canceled, the destination viewController should be removed from navigationController
[self.navigationObject.viewController removeFromParentViewController];