diff options
author | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2016-06-22 14:26:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-22 14:26:56 +0300 |
commit | 193a03c109edf34e7c7d2c46ab98cfa1f18e1cbd (patch) | |
tree | dce89ee427ac37c145cf3c49259555cfb2e38a81 /iphone | |
parent | 9983786b01c4960f914962923073c7d1d63209b9 (diff) | |
parent | 00be478906e2344171b9b5ab7c92bb3809b815d6 (diff) |
Merge pull request #3636 from igrechuhin/location-manager-duplicate-alert
[ios] Workaround for current location manager duplicate error alerts.
Diffstat (limited to 'iphone')
-rw-r--r-- | iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm index 0e350b3461..d8cd72a248 100644 --- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm +++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm @@ -1,7 +1,8 @@ #import "Common.h" +#import "MapsAppDelegate.h" #import "MWMAlertViewController.h" #import "MWMDownloadTransitMapAlert.h" -#import "MapsAppDelegate.h" +#import "MWMLocationAlert.h" static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController"; @@ -199,6 +200,16 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController - (void)displayAlert:(MWMAlert *)alert { + //TODO(igrechuhin): Remove this check on location manager refactoring. + //Workaround for current location manager duplicate error alerts. + if ([alert isKindOfClass:[MWMLocationAlert class]]) + { + for (MWMAlert * view in self.view.subviews) + { + if ([view isKindOfClass:[MWMLocationAlert class]]) + return; + } + } [UIView animateWithDuration:kDefaultAnimationDuration animations:^ { for (MWMAlert * view in self.view.subviews) |