[ios] tilt gesture type fix (#9642)

* [ios] Change function:angleBetweenPoints return type

* [ios] Update changelog
This commit is contained in:
Fabian Guerra Soto
2017-07-28 10:22:16 -07:00
committed by GitHub
parent caba393c0e
commit b0bae6d1dd
2 changed files with 6 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Reduced the size of the dynamic framework by optimizing symbol visibility. ([#7604](https://github.com/mapbox/mapbox-gl-native/pull/7604))
* Fixed an issue where the attribution button would have its custom tint color reset when the map view received a tint color change notification, such as when an alert controller was presented. ([#9598](https://github.com/mapbox/mapbox-gl-native/pull/9598))
* Improved the behavior of zoom gestures when the map reaches the minimum zoom limit. ([#9626](https://github.com/mapbox/mapbox-gl-native/pull/9626))
* Fixed an issue where tilt gesture was triggered with two fingers aligned vertically and panning down. ([#9571](https://github.com/mapbox/mapbox-gl-native/pull/9571))
* Bitcode symbol maps (.bcsymbolmap files) are now included with the dynamic framework. ([#9613](https://github.com/mapbox/mapbox-gl-native/pull/9613))
## 3.6.0 - June 29, 2017

View File

@@ -1848,7 +1848,7 @@ public:
east = swap;
}
float horizontalToleranceDegrees = 60.0;
CLLocationDegrees horizontalToleranceDegrees = 60.0;
if ([self angleBetweenPoints:west east:east] > horizontalToleranceDegrees) {
return NO;
}
@@ -1876,12 +1876,12 @@ public:
return ([validSimultaneousGestures containsObject:gestureRecognizer] && [validSimultaneousGestures containsObject:otherGestureRecognizer]);
}
- (float)angleBetweenPoints:(CGPoint)west east:(CGPoint)east
- (CLLocationDegrees)angleBetweenPoints:(CGPoint)west east:(CGPoint)east
{
float slope = (west.y - east.y) / (west.x - east.x);
CGFloat slope = (west.y - east.y) / (west.x - east.x);
float angle = atan(fabs(slope));
float degrees = MGLDegreesFromRadians(angle);
CGFloat angle = atan(fabs(slope));
CLLocationDegrees degrees = MGLDegreesFromRadians(angle);
return degrees;
}