Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm')
-rw-r--r--iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm
index 099bf55614..bc12b85b51 100644
--- a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm
+++ b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm
@@ -12,6 +12,7 @@
#import "MWMMapDownloaderTableViewCell.h"
#import "MWMMapDownloaderViewController.h"
#import "MWMMyTarget.h"
+#import "MWMMigrationViewController.h"
#import "MWMSegue.h"
#import "MWMStorage.h"
#import "MapsAppDelegate.h"
@@ -161,6 +162,20 @@ using namespace mwm;
}
- (void)configMyTarget { [MWMMyTarget manager].delegate = self; }
+
+- (void)backTap
+{
+ UINavigationController * navVC = self.navigationController;
+ NSArray<UIViewController *> * viewControllers = navVC.viewControllers;
+ NSInteger const viewControllersCount = viewControllers.count;
+ NSInteger const prevVCIndex = viewControllersCount - 2;
+ Class const migrationClass = [MWMMigrationViewController class];
+ if (prevVCIndex < 0 || [viewControllers[prevVCIndex] isKindOfClass:migrationClass])
+ [navVC popToRootViewControllerAnimated:YES];
+ else
+ [super backTap];
+}
+
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self.cellHeightCache removeAllObjects];