mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-01 08:45:09 +08:00
Simplify ASMapNode.setAnnotations
This commit is contained in:
@@ -260,12 +260,10 @@
|
||||
|
||||
- (void)setAnnotations:(NSArray *)annotations
|
||||
{
|
||||
if (annotations == nil) {
|
||||
annotations = @[];
|
||||
}
|
||||
annotations = [annotations copy] ?: @[];
|
||||
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
_annotations = [annotations copy];
|
||||
_annotations = annotations;
|
||||
if (self.isLiveMap) {
|
||||
[_mapView removeAnnotations:_mapView.annotations];
|
||||
[_mapView addAnnotations:annotations];
|
||||
|
||||
Reference in New Issue
Block a user