diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm index 7e482484cc..0cf42c6164 100644 --- a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm +++ b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm @@ -113,7 +113,7 @@ void RegisterEventIfPossible(eye::MapObject::Event::Type const type, place_page: if (!self.layout) { - self.layout = [[MWMPlacePageLayout alloc] initWithOwnerView:self.ownerViewController.controlsView + self.layout = [[MWMPlacePageLayout alloc] initWithOwnerView:self.ownerViewController.view delegate:self dataSource:self]; } diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm index d1b1f291da..6b7140237c 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm @@ -144,9 +144,7 @@ typedef NS_ENUM(NSUInteger, MWMScrollDirection) { - (CGFloat)openContentOffset { CGSize size = self.ownerView.size; CGFloat offset = self.isPortrait ? MAX(size.width, size.height) : MIN(size.width, size.height); - CGFloat actionBarHeight = self.actionBar.height; - offset -= actionBarHeight; - return offset * kTopPlacePageStopValue + actionBarHeight; + return offset * kTopPlacePageStopValue; } - (CGFloat)topContentOffset { diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm index e186398f91..69b135fa8d 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm @@ -387,7 +387,13 @@ std::array const kPreviewCells = {{[_MWMPPPTitle class], ? [MWMAdBanner detailedBannerExcessHeight] : 0; - return height + gapBannerHeight - excessHeight; + CGFloat safeArea = 0.0; + if (@available(iOS 11.0, *)) { + UIWindow *window = UIApplication.sharedApplication.keyWindow; + safeArea = window.safeAreaInsets.bottom; + } + + return height + gapBannerHeight - excessHeight + safeArea; } - (void)layoutInOpenState:(BOOL)isOpen