From af744235bc9e87436c132b8ad71cd6e2161269bc Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 27 Aug 2012 00:14:33 +0200 Subject: [PATCH] Status bar issue. [FIXED] Status bar issue. [FIXED] Review dialog link and buttons. --- External/Pearl | 2 +- MasterPassword/iOS/MPAppDelegate.m | 5 +++++ MasterPassword/iOS/MPGuideViewController.m | 8 +++++--- MasterPassword/iOS/MPMainViewController.m | 12 ++++++------ MasterPassword/iOS/MPUnlockViewController.m | 6 ++++-- .../iOS/MainStoryboard_iPhone.storyboard | 17 ++++++++--------- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/External/Pearl b/External/Pearl index 50ec656f..a392ba39 160000 --- a/External/Pearl +++ b/External/Pearl @@ -1 +1 @@ -Subproject commit 50ec656f29ff83de4f5119cf74935f7c8b2c3e38 +Subproject commit a392ba39e344b6c7da144dcdfb6046235fb24991 diff --git a/MasterPassword/iOS/MPAppDelegate.m b/MasterPassword/iOS/MPAppDelegate.m index 81828d46..b7a8a059 100644 --- a/MasterPassword/iOS/MPAppDelegate.m +++ b/MasterPassword/iOS/MPAppDelegate.m @@ -457,6 +457,11 @@ [TestFlight passCheckpoint:MPCheckpointShowGuide]; } +- (void)showFeedback { + + [self showFeedbackWithLogs:YES forVC:nil]; +} + - (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController { if (![PearlEMail canSendMail]) diff --git a/MasterPassword/iOS/MPGuideViewController.m b/MasterPassword/iOS/MPGuideViewController.m index dc2fe5ea..8781b612 100644 --- a/MasterPassword/iOS/MPGuideViewController.m +++ b/MasterPassword/iOS/MPGuideViewController.m @@ -28,22 +28,24 @@ - (void)viewWillAppear:(BOOL)animated { inf(@"Guide will appear."); + [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; + [super viewWillAppear:animated]; } - (void)viewDidAppear:(BOOL)animated { - [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:animated? UIStatusBarAnimationSlide: UIStatusBarAnimationNone]; - [super viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { inf(@"Guide will disappear."); - [super viewWillDisappear:animated]; + [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide]; [MPiOSConfig get].showQuickStart = @NO; + + [super viewWillDisappear:animated]; } - (void)viewDidUnload { diff --git a/MasterPassword/iOS/MPMainViewController.m b/MasterPassword/iOS/MPMainViewController.m index 7479c4b6..a4d7acc2 100644 --- a/MasterPassword/iOS/MPMainViewController.m +++ b/MasterPassword/iOS/MPMainViewController.m @@ -117,14 +117,12 @@ - (void)viewWillAppear:(BOOL)animated { - inf(@"Main will appear."); - [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:animated? UIStatusBarAnimationSlide: UIStatusBarAnimationNone]; - if ([[MPiOSConfig get].showQuickStart boolValue]) [[MPAppDelegate get] showGuide]; if (![MPAppDelegate get].activeUser) - [self.navigationController presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"] - animated:animated completion:nil]; + [self presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"] + animated:animated completion:nil]; + if (self.activeElement.user != [MPAppDelegate get].activeUser) self.activeElement = nil; @@ -144,10 +142,12 @@ - (void)viewDidAppear:(BOOL)animated { + inf(@"Main will appear"); + // Needed for when we appear after a modal VC dismisses: // We can't present until the other modal VC has been fully dismissed and presenting in viewDidAppear will fail. if (![MPAppDelegate get].activeUser) - [self.navigationController presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"] + [self presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"] animated:animated completion:nil]; if (![[MPiOSConfig get].actionsTipShown boolValue]) diff --git a/MasterPassword/iOS/MPUnlockViewController.m b/MasterPassword/iOS/MPUnlockViewController.m index 904a0d2f..cf5d758e 100644 --- a/MasterPassword/iOS/MPUnlockViewController.m +++ b/MasterPassword/iOS/MPUnlockViewController.m @@ -189,6 +189,8 @@ - (void)viewWillAppear:(BOOL)animated { + [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; + inf(@"Lock screen will appear"); self.selectedUser = nil; [self updateUsers]; @@ -198,8 +200,6 @@ - (void)viewDidAppear:(BOOL)animated { - [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:animated? UIStatusBarAnimationSlide: UIStatusBarAnimationNone]; - if (!animated) [[self findTargetedAvatar] setSelected:YES]; else @@ -211,6 +211,8 @@ - (void)viewWillDisappear:(BOOL)animated { inf(@"Lock screen will disappear"); + [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide]; + [super viewWillDisappear:animated]; } diff --git a/MasterPassword/iOS/MainStoryboard_iPhone.storyboard b/MasterPassword/iOS/MainStoryboard_iPhone.storyboard index c966b7cd..1efb1272 100644 --- a/MasterPassword/iOS/MainStoryboard_iPhone.storyboard +++ b/MasterPassword/iOS/MainStoryboard_iPhone.storyboard @@ -888,7 +888,7 @@ L4m3P4sSw0rD - + @@ -1136,11 +1136,11 @@ Pink fluffy door frame. - + - + @@ -1299,7 +1299,7 @@ Pink fluffy door frame. - +