From c3364bbbef18558e44ed2b6aa9236dfc8c46c064 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Tue, 3 Jun 2014 23:58:16 -0400 Subject: [PATCH] Fix link opening and popup dismissal bugs. --- MasterPassword/ObjC/iOS/MPNavigationController.m | 2 +- MasterPassword/ObjC/iOS/MPPopdownSegue.m | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPNavigationController.m b/MasterPassword/ObjC/iOS/MPNavigationController.m index cbaa9776..a7cf07aa 100644 --- a/MasterPassword/ObjC/iOS/MPNavigationController.m +++ b/MasterPassword/ObjC/iOS/MPNavigationController.m @@ -24,7 +24,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"web"]) - ((MPWebViewController *)segue.destinationViewController).initialURL = [NSURL URLWithString:@"http://thanks.lhunath.com"]; + ((MPWebViewController *)segue.destinationViewController).initialURL = sender; } @end diff --git a/MasterPassword/ObjC/iOS/MPPopdownSegue.m b/MasterPassword/ObjC/iOS/MPPopdownSegue.m index 8603fd36..8856f1ad 100644 --- a/MasterPassword/ObjC/iOS/MPPopdownSegue.m +++ b/MasterPassword/ObjC/iOS/MPPopdownSegue.m @@ -40,8 +40,7 @@ [UIView animateWithDuration:0.3f animations:^{ [passwordsVC.popdownToTopConstraint layoutWithPriority:1]; } completion:^(BOOL finished) { - if (finished) - [popdownVC didMoveToParentViewController:passwordsVC]; + [popdownVC didMoveToParentViewController:passwordsVC]; }]; } else if ([self.destinationViewController isKindOfClass:[MPPasswordsViewController class]]) { @@ -52,10 +51,8 @@ [UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationOptionOverrideInheritedDuration animations:^{ [passwordsVC.popdownToTopConstraint layoutWithPriority:UILayoutPriorityDefaultHigh]; } completion:^(BOOL finished) { - if (finished) { - [popdownVC.view removeFromSuperview]; - [popdownVC removeFromParentViewController]; - } + [popdownVC.view removeFromSuperview]; + [popdownVC removeFromParentViewController]; }]; } }