2
0

Fix link opening and popup dismissal bugs.

This commit is contained in:
Maarten Billemont 2014-06-03 23:58:16 -04:00
parent 74e8001506
commit c3364bbbef
2 changed files with 4 additions and 7 deletions

View File

@ -24,7 +24,7 @@
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"web"]) if ([segue.identifier isEqualToString:@"web"])
((MPWebViewController *)segue.destinationViewController).initialURL = [NSURL URLWithString:@"http://thanks.lhunath.com"]; ((MPWebViewController *)segue.destinationViewController).initialURL = sender;
} }
@end @end

View File

@ -40,8 +40,7 @@
[UIView animateWithDuration:0.3f animations:^{ [UIView animateWithDuration:0.3f animations:^{
[passwordsVC.popdownToTopConstraint layoutWithPriority:1]; [passwordsVC.popdownToTopConstraint layoutWithPriority:1];
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (finished) [popdownVC didMoveToParentViewController:passwordsVC];
[popdownVC didMoveToParentViewController:passwordsVC];
}]; }];
} }
else if ([self.destinationViewController isKindOfClass:[MPPasswordsViewController class]]) { else if ([self.destinationViewController isKindOfClass:[MPPasswordsViewController class]]) {
@ -52,10 +51,8 @@
[UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationOptionOverrideInheritedDuration animations:^{ [UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationOptionOverrideInheritedDuration animations:^{
[passwordsVC.popdownToTopConstraint layoutWithPriority:UILayoutPriorityDefaultHigh]; [passwordsVC.popdownToTopConstraint layoutWithPriority:UILayoutPriorityDefaultHigh];
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (finished) { [popdownVC.view removeFromSuperview];
[popdownVC.view removeFromSuperview]; [popdownVC removeFromParentViewController];
[popdownVC removeFromParentViewController];
}
}]; }];
} }
} }