Repository navigation
[ios] Expose -showAttribution publicly as an IBAction - #10085
Conversation
| made available so that it can be assigned to custom attribution button | ||
| implementations. | ||
| */ | ||
| - (IBAction)showAttribution; |
There was a problem hiding this comment.
This is a valid IBAction signature, but it's customary to add a sender parameter even if we won't use it for anything. (It helps distinguish callers, sort of like the first parameter in a delegate method.)
There was a problem hiding this comment.
^ Agree. The sender parameter will make this clear.
| */ | ||
| - (IBAction)showAttribution; | ||
|
|
||
| // Support for style classes has been removed. This property always returns an empty array. |
There was a problem hiding this comment.
Should we mark these methods @nodoc to prevent them from counting against our documentation coverage metric?
There was a problem hiding this comment.
Got this with f8dda96 — jazzy seems fairly particular about requiring the triple-slash, immediately followed by :nodoc:.
| Show the attribution and telemetry action sheet. | ||
|
|
||
| This method is called when the user taps on `attributionButton`. This method is | ||
| made available so that it can be assigned to custom attribution button |
There was a problem hiding this comment.
Nit: added as an action of custom attribution button implementations.
| call `-showAttribution`. | ||
|
|
||
| @note The Mapbox terms of service, which governs the use of Mapbox-hosted | ||
| vector tiles and styles, |
There was a problem hiding this comment.
This is a better place to mention the new action, probably.
There was a problem hiding this comment.
This new action is equally relevant to both the attribution and telemetry @note sections, though. How about something like:
A view showing legally required copyright notices and telemetry settings,
positioned at the bottom-right of the map view.If you choose to reimplement this view, assign the
-showAttribution:method
as the action for your view to present the default notices and settings.
@note...
| made available so that it can be assigned to custom attribution button | ||
| implementations. | ||
| */ | ||
| - (IBAction)showAttribution; |
There was a problem hiding this comment.
^ Agree. The sender parameter will make this clear.
| A view showing legally required copyright notices and telemetry settings, | ||
| positioned at the bottom-right of the map view. | ||
| positioned at the bottom-right of the map view. Tapping on this button will | ||
| call `-showAttribution`. |
There was a problem hiding this comment.
Update this to -showAttribution:.
| Show the attribution and telemetry action sheet. | ||
|
|
||
| This method is called when the user taps on `attributionButton`. This method is | ||
| made available so that it can be added as an action of custom attribution |
There was a problem hiding this comment.
Nit: avoid passive voice:
This action is performed when the user taps on the attribution button provided by default via the
attributionButtonproperty. If you implement a custom attribution button, you should add this action to the button.
f8dda96 to
076af14
Compare
|
Rebased, fixed those last little issues, and squashed — will merge this once tests are 🥗. |

Fixes #9024 by exposing
-[MGLMapView showAttribution]as anIBAction.Also removes the deprecated/non-functional style class methods (#8953) from jazzy docs.
Questions
-showAttributionshould be split out of the “Configuring the Map’s Appearance” category./cc @1ec5 @fabian-guerra