This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ios, macos] Revised descriptions for abstract classes #9095
Merged
jmkiley
merged 6 commits into
release-ios-v3.6.0-android-v5.1.0
from
jmkiley-initializer-docs
Jun 14, 2017
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f2c0add
[ios, macos] revised descriptions for abstract classes
a2a4222
[ios, macos]revisions round 1
37e1710
[ios, macos] revisions part 2
b9a9df7
[ios, macos] revised MGLForegroundStyleLayer
ff784d3
[ios, macos] added subclass warnings
60fc2a2
[ios, macos] added subclass warnings
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,9 +140,9 @@ typedef NS_ENUM(NSUInteger, MGLTileCoordinateSystem) { | |
Mapbox-hosted tile set, view it in | ||
<a href="https://www.mapbox.com/studio/tilesets/">Mapbox Studio’s Tilesets editor</a>. | ||
|
||
Do not create instances of this class directly, and do not create your own | ||
subclasses of this class. Instead, create instances of `MGLRasterSource` and | ||
`MGLVectorSource`. | ||
Create instances of `MGLRasterSource` and `MGLVectorSource` in order to use | ||
`MGLTileSource`'s properties and methods. Do not create instances of `MGLTileSource` | ||
directly. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be great to have an admonition against subclassing MGLSource, MGLStyleFunction, MGLStyleLayer, MGLTileSource, and MGLVectorStyleLayer, as there is for MGLForegroundStyleLayer. |
||
*/ | ||
MGL_EXPORT | ||
@interface MGLTileSource : MGLSource | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous wording (“do not create instances of this class”) matches Apple documentation. It’s fine to start with a positive description of what to do, but we still need to emphasize what not to do, because it’s very easy in Objective-C to fall into the trap of initializing an abstract superclass directly.
Additionally, it’s important to state that the developer shouldn’t create their own subclass of this class, due to how this class keeps track of a C++ object under the hood.