From 0b146ffccbc9ddf18a4486aa35c93980adeca403 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 3 Jul 2017 12:52:09 +0300 Subject: [PATCH] [MAPSME-4397] [ios] Fixed iPhone Place Page layout issue. --- .../PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm | 6 ++++-- .../PlacePage/PlacePageLayout/PlacePageView/MWMPPView.xib | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm index df3b416cec..21003b2de3 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMiPhonePlacePageLayoutImpl.mm @@ -107,7 +107,9 @@ CGFloat const kMinOffset = 1; - (void)onScreenResize:(CGSize const &)size { UIScrollView * sv = self.scrollView; + sv.delegate = nil; sv.frame = {{}, size}; + sv.delegate = self; self.placePageView.minY = size.height; auto actionBar = self.actionBar; actionBar.frame = {{0., size.height - actionBar.height}, @@ -162,8 +164,8 @@ CGFloat const kMinOffset = 1; - (CGFloat)topContentOffset { auto const target = self.openContentOffset; - auto const ppView = self.placePageView; - return MIN(target, ppView.height); + auto const ppViewMaxY = self.placePageView.tableView.maxY; + return MIN(target, ppViewMaxY); } - (void)scrollViewDidScroll:(MWMPPScrollView *)scrollView diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/PlacePageView/MWMPPView.xib b/iphone/Maps/UI/PlacePage/PlacePageLayout/PlacePageView/MWMPPView.xib index 9c79e73d94..8d7f235cc8 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/PlacePageView/MWMPPView.xib +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/PlacePageView/MWMPPView.xib @@ -1,11 +1,11 @@ - + - + @@ -37,7 +37,7 @@ - +