Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Fix arrow direction issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydsheng committed Apr 11, 2019
1 parent 8f0837a commit 1992e03
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6410,8 +6410,19 @@ - (void)updateCalloutView
}

- (void)updateAttributionAlertView {
if (self.attributionController && self.attributionController.presentingViewController) {
if (self.attributionController.presentingViewController) {
self.attributionController.popoverPresentationController.sourceRect = self.attributionButton.frame;
switch (self.attributionButtonPosition) {
case MGLOrnamentPositionTopLeft:
case MGLOrnamentPositionTopRight:
[self.attributionController.popoverPresentationController setPermittedArrowDirections:UIMenuControllerArrowUp];
break;
case MGLOrnamentPositionBottomLeft:
case MGLOrnamentPositionBottomRight:
[self.attributionController.popoverPresentationController setPermittedArrowDirections:UIMenuControllerArrowDown];
break;
}
[self.attributionController.popoverPresentationController.containerView setNeedsLayout];
}
}

Expand Down

0 comments on commit 1992e03

Please sign in to comment.