[iOS] fix PP action bar when searching on map

https://jira.mail.ru/browse/MAPSME-11711
This commit is contained in:
Aleksey Belouosv 2019-09-03 18:46:46 +03:00 committed by Aleksey Belousov
parent 8b6cab1958
commit 12460ddd09
3 changed files with 9 additions and 5 deletions

View file

@ -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];
}

View file

@ -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 {

View file

@ -387,7 +387,13 @@ std::array<Class, 9> 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