From fc5eb69779e5d0615a9313383eb840abc225d114 Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Fri, 9 Dec 2016 14:08:21 +0300 Subject: [PATCH] [ios] Place page rotation fix. --- iphone/Maps/Classes/MWMiPhonePlacePageLayoutImpl.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Classes/MWMiPhonePlacePageLayoutImpl.mm b/iphone/Maps/Classes/MWMiPhonePlacePageLayoutImpl.mm index 2d86879d8c..0d72e7e790 100644 --- a/iphone/Maps/Classes/MWMiPhonePlacePageLayoutImpl.mm +++ b/iphone/Maps/Classes/MWMiPhonePlacePageLayoutImpl.mm @@ -101,12 +101,15 @@ CGFloat const kMinOffset = 1; - (void)onScreenResize:(CGSize const &)size { - self.scrollView.frame = {{}, size}; + UIScrollView * sv = self.scrollView; + sv.frame = {{}, size}; self.placePageView.minY = size.height; auto actionBar = self.actionBar; actionBar.frame = {{0., size.height - actionBar.height}, {size.width, actionBar.height}}; [self.delegate onPlacePageTopBoundChanged:self.scrollView.contentOffset.y]; + [sv setContentOffset:{0, self.state == State::Top ? self.topContentOffset : self.expandedContentOffset} + animated:YES]; } - (void)onUpdatePlacePageWithHeight:(CGFloat)height