Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-09-14 17:52:41 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:05:35 +0300
commit231e5de63ce16b255fa39d99947210476e2f8aba (patch)
tree2784559d2ca4afcf652dfe84495d286efd9be6cb /iphone/Maps/Classes/MWMiPadPlacePage.mm
parent43e224110313befa5da64d96afa737e7c0c4c218 (diff)
[ios] Updated search to v2.0.
Diffstat (limited to 'iphone/Maps/Classes/MWMiPadPlacePage.mm')
-rw-r--r--iphone/Maps/Classes/MWMiPadPlacePage.mm19
1 files changed, 14 insertions, 5 deletions
diff --git a/iphone/Maps/Classes/MWMiPadPlacePage.mm b/iphone/Maps/Classes/MWMiPadPlacePage.mm
index 41551f0d95..1b099c6b26 100644
--- a/iphone/Maps/Classes/MWMiPadPlacePage.mm
+++ b/iphone/Maps/Classes/MWMiPadPlacePage.mm
@@ -114,7 +114,8 @@ static CGFloat const kBottomOffset = 12.;
UIView * view = self.navigationController.view;
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
- view.minX = kLeftOffset;
+ view.minY = self.topBound + kTopOffset;
+ view.minX = self.leftBound + kLeftOffset;
view.alpha = 1.0;
}];
}
@@ -193,11 +194,12 @@ static CGFloat const kBottomOffset = 12.;
UIView * view = self.navigationController.view;
UIView * superview = view.superview;
+ CGFloat const leftOffset = self.leftBound + kLeftOffset;
view.minX += [sender translationInView:superview].x;
- view.minX = MIN(view.minX, kLeftOffset);
+ view.minX = MIN(view.minX, leftOffset);
[sender setTranslation:CGPointZero inView:superview];
- CGFloat const alpha = MAX(0.0, view.maxX) / (view.width + kLeftOffset);
+ CGFloat const alpha = MAX(0.0, view.maxX) / (view.width + leftOffset);
view.alpha = alpha;
UIGestureRecognizerState const state = sender.state;
if (state == UIGestureRecognizerStateEnded || state == UIGestureRecognizerStateCancelled)
@@ -220,8 +222,7 @@ static CGFloat const kBottomOffset = 12.;
- (void)updatePlacePagePosition
{
UIView * view = self.navigationController.view;
- view.maxY = [self getAvailableHeight] + kTopOffset;
- view.minY = MIN(view.minY, self.topBound + kTopOffset);
+ view.minY = MIN([self getAvailableHeight] + kTopOffset - view.height, self.topBound + kTopOffset);
[self configureContentInset];
}
@@ -277,4 +278,12 @@ static CGFloat const kBottomOffset = 12.;
}];
}
+- (void)setLeftBound:(CGFloat)leftBound
+{
+ super.leftBound = leftBound;
+ [UIView animateWithDuration:kDefaultAnimationDuration animations:^
+ {
+ self.navigationController.view.minX = leftBound + kLeftOffset;
+ }];
+}
@end