[MAPSME-5411] [ios] Fixed PP opening issue.

This commit is contained in:
Ilya Grechuhin 2017-08-23 16:22:17 +03:00 committed by Vladimir Byko-Ianko
parent 86cf7ddc6c
commit 46ff18eb1c
2 changed files with 9 additions and 8 deletions

View file

@ -586,8 +586,9 @@ BOOL gIsFirstMyPositionMode = YES;
{
auto const kbHeight = [MWMKeyboard keyboardHeight];
self.visibleAreaKeyboard.constant = kbHeight;
self.placePageAreaKeyboard.constant = kbHeight;
self.sideButtonsAreaKeyboard.constant = kbHeight;
if (IPAD)
self.placePageAreaKeyboard.constant = kbHeight;
[self.view layoutIfNeeded];
}
#pragma mark - Properties

View file

@ -190,28 +190,28 @@ CGFloat const kMinOffset = 1;
if ([scrollView isEqual:ppView.tableView])
return;
auto const & offset = scrollView.contentOffset;
auto const & offsetY = scrollView.contentOffset.y;
id<MWMPlacePageLayoutDelegate> delegate = self.delegate;
if (offset.y <= 0)
if (offsetY <= 0)
{
[delegate onPlacePageTopBoundChanged:0];
[delegate closePlacePage];
return;
}
if (offset.y > ppView.height + kLuftDraggingOffset)
auto const bounded = ppView.height + kLuftDraggingOffset;
if (offsetY > bounded)
{
auto const bounded = ppView.height + kLuftDraggingOffset;
[scrollView setContentOffset:{0, bounded}];
[delegate onPlacePageTopBoundChanged:bounded];
}
else
{
[delegate onPlacePageTopBoundChanged:offset.y];
[delegate onPlacePageTopBoundChanged:offsetY];
}
self.direction = self.lastContentOffset < offset.y ? ScrollDirection::Up : ScrollDirection::Down;
self.lastContentOffset = offset.y;
self.direction = self.lastContentOffset < offsetY ? ScrollDirection::Up : ScrollDirection::Down;
self.lastContentOffset = offsetY;
}
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView