From c508ed8c461131e8f8c34b5de5a301a2899ef6d5 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Wed, 29 Feb 2012 19:59:01 +0100 Subject: [PATCH] Fix appearance of content tip edit icon. [FIXED] Tip on storage type passwords had a missing edit icon. MP-5 fixed --- MasterPassword/MPMainViewController.m | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/MasterPassword/MPMainViewController.m b/MasterPassword/MPMainViewController.m index fb7db1da..9fb717ab 100644 --- a/MasterPassword/MPMainViewController.m +++ b/MasterPassword/MPMainViewController.m @@ -55,7 +55,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"MP_Main_ChooseType"]) - [[segue destinationViewController] setDelegate:self]; + ((MPTypeViewController *)[segue destinationViewController]).delegate = self; } - (void)viewWillAppear:(BOOL)animated { @@ -115,7 +115,7 @@ }]; self.alertBody.text = nil; - self.contentTipEditIcon.alpha = 0; + self.contentTipEditIcon.hidden = YES; [super viewDidLoad]; } @@ -232,14 +232,17 @@ [UIView animateWithDuration:0.2f animations:^{ self.contentTipContainer.alpha = 1; } completion:^(BOOL finished) { - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 5.0f * NSEC_PER_SEC); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - [UIView animateWithDuration:0.2f animations:^{ - self.contentTipContainer.alpha = 0; - } completion:^(BOOL finished) { - icon.hidden = YES; - }]; - }); + if (finished) { + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + [UIView animateWithDuration:0.2f animations:^{ + self.contentTipContainer.alpha = 0; + } completion:^(BOOL finished) { + if (finished) + icon.hidden = YES; + }]; + }); + } }]; }