diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h index adc10907c8..c5fb5b49cd 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h @@ -14,5 +14,6 @@ - (void)processMyPositionStateModeEvent:(MWMMyPositionMode)mode; + (void)updateAvailableArea:(CGRect)frame; ++ (CGRect)getAvailableArea; @end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm index 98b340272a..1eab6ad453 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm @@ -57,6 +57,9 @@ NSString * const kUDDidShowLongTapToShowSideButtonsToast = @"kUDDidShowLongTapTo } + (void)updateAvailableArea:(CGRect)frame { [[self buttons].sideView updateAvailableArea:frame]; } + ++ (CGRect)getAvailableArea { return [self buttons].sideView.getAvailableArea; } + - (void)zoomIn { GetFramework().Scale(Framework::SCALE_MAG, true); diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.h b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.h index dee00bda0a..aaffc37534 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.h @@ -8,5 +8,6 @@ - (void)setHidden:(BOOL)hidden animated:(BOOL)animated; - (void)updateAvailableArea:(CGRect)frame; +- (CGRect)getAvailableArea; @end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm index bfea45c39b..ba8dd8ee50 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm @@ -144,6 +144,10 @@ CGFloat const kButtonsBottomOffset = 6; [self setNeedsLayout]; } +- (CGRect)getAvailableArea { + return self.availableArea; +} + - (CGFloat)availableHeight { return self.availableArea.size.height - kButtonsTopOffset - kButtonsBottomOffset; }