clusterlayer-plugin-ios
clusterlayer-plugin-ios copied to clipboard
Question: Properties starting with underscore?
Indeed, automatically created ivars for a property will be the property name preceded by an underscore (or can be declared explicitly with a @synthesize statement).
We can drop the leading underscore or rename the properties. They're named the way they are to distinguish them unambiguously from the public features and clusters properties.
The clusters property no longer exists anyway, so feel free to suggest a good name for these.
How about an ivar for both clusters and features in the implementation file?
In AGSCluster.h (As-is)
//All features, including (recursively) those of child-clusters
@property (nonatomic, readonly) NSArray *features;
In AGSCluster.m, create instance variables
@interface AGSCluster () {
NSMutableArray *_features;
NSMutableArray *_clusters;
}
//getters
-(NSArray *)features {
return _features;
}
-(NSArray *)childClusters {
return _clusters;
}