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
path: root/iphone
diff options
context:
space:
mode:
authorv.mikhaylenko <v.mikhaylenko@corp.mail.ru>2015-08-10 18:47:44 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:00:32 +0300
commitf8deb26569dcb51e32690876969355adb471bf7b (patch)
tree5da374417a9e740f6a7923b4341e4aeb6135aaf1 /iphone
parent5fa3fa82b98b325338ca08e95ddc040ba758e23c (diff)
[ios] Fixed routing disclaimer alert.
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/CustomAlert/RoutingDisclaimerAlert/MWMRoutingDisclaimerAlert.mm3
-rw-r--r--iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm7
2 files changed, 7 insertions, 3 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/RoutingDisclaimerAlert/MWMRoutingDisclaimerAlert.mm b/iphone/Maps/Classes/CustomAlert/RoutingDisclaimerAlert/MWMRoutingDisclaimerAlert.mm
index 23466150de..e92c90a0a9 100644
--- a/iphone/Maps/Classes/CustomAlert/RoutingDisclaimerAlert/MWMRoutingDisclaimerAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/RoutingDisclaimerAlert/MWMRoutingDisclaimerAlert.mm
@@ -55,7 +55,8 @@ static CGFloat const kMinimumOffset = 20.;
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
{
- CGFloat const height = UIInterfaceOrientationIsLandscape(orientation) ? MIN(self.superview.width, self.superview.height) : MAX(self.superview.width, self.superview.height);
+ UIView * superview = self.superview ? self.superview : UIApplication.sharedApplication.keyWindow;
+ CGFloat const height = UIInterfaceOrientationIsLandscape(orientation) ? MIN(superview.width, superview.height) : MAX(superview.width, superview.height);
[self invalidateTextViewHeight:self.textView.contentSize.height withHeight:height];
}
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm
index 589c3dd1be..b8d242098b 100644
--- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm
+++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm
@@ -132,8 +132,11 @@
GetFramework().BuildRoute(self.routeDestination, 0 /* timeoutSec */);
// This hack is needed to instantly show initial progress.
// Because user may think that nothing happens when he is building a route.
- CGFloat const initialRoutingProgress = 5.;
- [self setRouteBuildingProgress:initialRoutingProgress];
+ dispatch_async(dispatch_get_main_queue(), ^
+ {
+ CGFloat const initialRoutingProgress = 5.;
+ [self setRouteBuildingProgress:initialRoutingProgress];
+ });
}
- (void)navigationDashBoardDidUpdate