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-06-24 17:32:27 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:52:53 +0300
commit226c68fbf68632e9d3b873364839f6cc84ea061d (patch)
tree69fe4ac962b8801e78fa1090454e7eabe159a23c /iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm
parent090ba97c566b1fc99cc610a19eec832e5d69dbbf (diff)
[ios] Fixed PP crash on swipe.
Diffstat (limited to 'iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm')
-rw-r--r--iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm17
1 files changed, 10 insertions, 7 deletions
diff --git a/iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm b/iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm
index 6f3c8acf8d..8e903e01c6 100644
--- a/iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm
+++ b/iphone/Maps/Classes/MWMiPhoneLandscapePlacePage.mm
@@ -59,12 +59,6 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
self.state = MWMiPhoneLandscapePlacePageStateClosed;
}
-- (void)setState:(MWMiPhoneLandscapePlacePageState)state
-{
- _state = state;
- [self updateTargetPoint];
-}
-
- (void)updateTargetPoint
{
CGSize const size = UIScreen.mainScreen.bounds.size;
@@ -94,9 +88,10 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
UIGestureRecognizerState const state = sender.state;
if (state == UIGestureRecognizerStateEnded || state == UIGestureRecognizerStateCancelled)
{
+ sender.enabled = NO;
self.panVelocity = [sender velocityInView:ppvSuper].x;
if (self.panVelocity > 0)
- self.state = MWMiPhoneLandscapePlacePageStateOpen;
+ [self show];
else
[self.manager dismissPlacePage];
}
@@ -129,6 +124,12 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
#pragma mark - Properties
+- (void)setState:(MWMiPhoneLandscapePlacePageState)state
+{
+ _state = state;
+ [self updateTargetPoint];
+}
+
- (void)setTopBound:(CGFloat)topBound
{
super.topBound = topBound;
@@ -151,6 +152,8 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
__strong MWMiPhoneLandscapePlacePage * self = weakSelf;
if (self.state == MWMiPhoneLandscapePlacePageStateClosed)
[super dismiss];
+ else
+ self.panRecognizer.enabled = YES;
}];
self.panVelocity = 0.0;
}