Suppress warning when dequeueing subclasses (#5244)

When using a subclass of `MGLAnnotationView` or `MGLAnnotationImage`, the following warning occurs:

`Incompatible pointer types initializing 'MyClassName *' with an expression of type 'MGLAnnotationView * _Nullable'`

This change eliminates the warning  and matches Apple's implementation of `UITableViewCell`.
This commit is contained in:
Alan Kinnaman
2016-06-14 00:17:08 -07:00
committed by Minh Nguyễn
parent 3f5ea169f5
commit 1e41c151f6

View File

@@ -965,7 +965,7 @@ IB_DESIGNABLE
@return An annotation image object with the given identifier, or `nil` if no
such object exists in the reuse queue.
*/
- (nullable MGLAnnotationImage *)dequeueReusableAnnotationImageWithIdentifier:(NSString *)identifier;
- (nullable __kindof MGLAnnotationImage *)dequeueReusableAnnotationImageWithIdentifier:(NSString *)identifier;
/**
Returns a reusable annotation view object associated with its identifier.
@@ -981,7 +981,7 @@ IB_DESIGNABLE
@return An annotation view object with the given identifier, or `nil` if no
such object exists in the reuse queue.
*/
- (nullable MGLAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
- (nullable __kindof MGLAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
#pragma mark Managing Annotation Selections