Skip to content

Commit

Permalink
[ios] fix missing attribution (mapbox#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
atierian authored Feb 15, 2022
1 parent 747eb3a commit 2025cf0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions platform/ios/platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,15 @@ - (void)showAttribution:(id)sender
{
attributionController.title = [actionSheetTitle stringByAppendingFormat:@" %@", [NSBundle mgl_frameworkInfoDictionary][@"MGLSemanticVersionString"]];
}

NSArray *attributionInfos = [self.style attributionInfosWithFontSize:[UIFont buttonFontSize] linkColor:nil];
for (MGLAttributionInfo *attributionInfo in attributionInfos)
{
UIAlertAction *action = [UIAlertAction actionWithTitle:[attributionInfo.title.string mgl_titleCasedStringWithLocale:[NSLocale currentLocale]]
style:UIAlertActionStyleDefault
handler:nil];
[attributionController addAction:action];
}

NSString *cancelTitle = NSLocalizedStringWithDefaultValue(@"CANCEL", nil, nil, @"Cancel", @"Title of button for dismissing attribution action sheet");
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelTitle
Expand Down

0 comments on commit 2025cf0

Please sign in to comment.