Skip to content

Commit fcda709

Browse files
committed
adds missing docs
1 parent 9986dd2 commit fcda709

File tree

6 files changed

+131
-35
lines changed

6 files changed

+131
-35
lines changed

EPMapExtensions/EPAnnotationArray.h

Lines changed: 82 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,36 @@
1717
NSMutableArray *_annotationArray;
1818
}
1919

20-
/**
21-
Designed initializer
22-
20+
///-------------------------------------------------
21+
/// @name Init collection
22+
///-------------------------------------------------
23+
24+
/**
2325
@param annotations Annotation array which contains objects conforming to `MKAnnotation` protocol
2426
*/
2527

2628
- (id)initWithAnnotationArray:(NSArray *)annotations;
2729

30+
///-------------------------------------------------
31+
/// @name Getting annotation properties
32+
///-------------------------------------------------
33+
2834
/**
2935
It returns all the annotations in the collection
3036
*/
3137

3238
- (NSArray *)allAnnotations;
3339

40+
/**
41+
It returns the number of annotations in the collection
42+
*/
43+
44+
- (NSUInteger)count;
45+
46+
///-------------------------------------------------
47+
/// @name Getting filtered annotation set
48+
///-------------------------------------------------
49+
3450
/**
3551
@param protocol It's the protocol whose retrieved annotations must adhere to
3652
@@ -49,51 +65,104 @@
4965
- (NSArray *)annotationsConformsToProtocols:(NSArray *)protocols;
5066

5167
/**
52-
68+
@param cls It's the `Class` whose retrieved annotation must subclass
5369
*/
5470

5571
- (NSArray *)annotationsOfKindOfClass:(Class<MKAnnotation>)cls;
5672

5773
/**
58-
Annotation Collection class which wraps up a mutable a `NSMutableArray` and contains `MKAnnotation` protocol conform objects
74+
@param classes Array of `Class`es whose retrieved annotation must subclass
5975
*/
6076

6177
- (NSArray *)annotationsOfKindOfClasses:(NSArray *)classes;
6278

6379
/**
64-
Annotation Collection class which wraps up a mutable a `NSMutableArray` and contains `MKAnnotation` protocol conform objects
80+
It returns an array containing annotations within a given region
81+
82+
@param radius The radius of the circular region
83+
@param center The center of the circular region
6584
*/
6685

6786
- (NSArray *)annotationsWithinRange:(CLLocationDistance)radius center:(CLLocationCoordinate2D)center;
6887

69-
/**
70-
Annotation Collection class which wraps up a mutable a `NSMutableArray` and contains `MKAnnotation` protocol conform objects
71-
*/
72-
73-
74-
- (NSUInteger)count;
75-
7688
@end
7789

7890
@interface EPAnnotationArray (EPAnnotationMutableArray)
7991

92+
///-------------------------------------------------
93+
/// @name Mutating collection
94+
///-------------------------------------------------
95+
8096
/**
8197
Adds annotation to the container
98+
99+
@param annotation An object conforming to the `MKAnnotation` protocol
82100
@exception raises an exception if annotation is not conforming to `MKAnnotation` protocol
83101
*/
84102

85103
- (void)addAnnotation:(id <MKAnnotation>)annotation;
104+
105+
/**
106+
Adds annotations to the container
107+
108+
@param annotations An array of objects conforming to the `MKAnnotation` protocol
109+
@exception raises an exception if annotation is not conforming to `MKAnnotation` protocol
110+
*/
111+
86112
- (void)addAnnotations:(NSArray *)annotations;
87113

114+
/**
115+
Removes annotations of kind of class from the container
116+
117+
@param cls The class annotations to be removed must extend
118+
*/
119+
88120
- (void)removeAnnotationsOfKindOfClass:(Class <MKAnnotation>)cls;
121+
122+
/**
123+
Removes annotations of kind of classes from the container
124+
125+
@param classes The array of classes annotations to be removed must extend
126+
*/
127+
89128
- (void)removeAnnotationsOfKindOfClasses:(NSArray *)classes;
90129

130+
/**
131+
Removes annotations conforming to a given protocol from the container
132+
133+
@param protocol The protocol annotations to be removed must adhere
134+
*/
135+
91136
- (void)removeAnnotationsConformsToProtocol:(Protocol *)protocol;
137+
138+
/**
139+
Removes all the annotations conforming to a given set of protocols
140+
141+
@param protocols Array of protocols annotations to be removed must adhere
142+
*/
92143
- (void)removeAnnotationsConformsToProtocols:(NSArray *)protocols;
93144

145+
/**
146+
Removes a given annotation from the container
147+
148+
@param annotation The annotation to be removed from the collection
149+
*/
150+
94151
- (void)removeAnnotation:(id <MKAnnotation>)annotation;
152+
153+
/**
154+
Removes given annotations from the collection
155+
156+
@param annotations The array of annotations to be removed
157+
*/
158+
95159
- (void)removeAnnotations:(NSArray *)annotations;
96160

161+
/**
162+
Removes all the annotations from the container
163+
164+
*/
165+
97166
- (void)removeAllAnnotations;
98167

99168
@end

EPMapExtensions/EPMapView.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
Computes the centered region with respect to all annotations presented in the map
3636
3737
@return The centered region
38-
@note If no one annotation is contained in the map it returns the current visible map region
38+
@warning If no one annotation is found in the map it returns the current visible map region
39+
3940
*/
4041

4142
- (MKCoordinateRegion)centeredRegion;
@@ -44,7 +45,7 @@
4445
Computes the centered region with respect to all annotations presented in the map conforming to a given protocol
4546
@param protocol The protocol used to filter annotations
4647
47-
@note If no one annotation is found in the map it returns the current visible map region
48+
@warning If no one annotation is found in the map it returns the current visible map region
4849
*/
4950

5051
- (MKCoordinateRegion)centeredRegionForAnnotationConformingToProtocol:(Protocol *)protocol;
@@ -53,7 +54,7 @@
5354
Computes the centered region with respect to all annotations presented in the map conforming to an array of protocols
5455
@param protocols The array of protocols to filter annotations
5556
56-
@note If no one annotation is found in the map it returns the current visible map region
57+
@warning If no one annotation is found in the map it returns the current visible map region
5758
*/
5859

5960
- (MKCoordinateRegion)centeredRegionForAnnotationConformingToProtocols:(NSArray *)protocols;
@@ -62,7 +63,7 @@
6263
Computes the centered region with respect to all annotations belonging to a given kind of class
6364
@param cls The kind of class used to filter annotations
6465
65-
@note If no one annotation is found in the map it returns the current visible map region
66+
@warning If no one annotation is found in the map it returns the current visible map region
6667
*/
6768

6869
- (MKCoordinateRegion)centeredRegionForAnnotationOfKindOfClass:(Class)cls;
@@ -71,7 +72,7 @@
7172
Computes the centered region with respect to all annotations belonging to a given pool of classes
7273
@param classes Array of classes used to filter the annotations
7374
74-
@note If no one annotation is found in the map it returns the current visible map region
75+
@warning If no one annotation is found in the EPMapView it returns the **current visible** map region
7576
*/
7677

7778
- (MKCoordinateRegion)centeredRegionForAnnotationOfKindOfClasses:(NSArray *)classes;

EPMapExtensions/EPMapViewDecorator.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@
2020
/**
2121
@param mapView The map view on which annotations are displayed
2222
@param annotation The annotation to be displayed
23-
@return annotation view corresponding to the current annotation
23+
@result annotation view corresponding to the current annotation
2424
*/
2525
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation;
2626
@end
2727

2828

2929
/**
3030
`EPMapViewDecorator` deals with the graphical representation of the map annotations. Basically it's designed to map annotation points over `MKMapView` to a set of customized annotation views.
31-
3231
*/
3332

3433
@interface EPMapViewDecorator : NSObject <EPMapViewDecoratorProtocol> {
@@ -48,7 +47,7 @@
4847
/**
4948
The user location annotation view.
5049
51-
@note default value is `nil`
50+
@warning The default value is `nil`
5251
*/
5352

5453
@property (nonatomic, strong) MKAnnotationView *userLocationAnnotationView;
@@ -57,7 +56,7 @@
5756
/**
5857
The default annotation view which is drown when no one annotation is registered.
5958
60-
@note default value is `nil`
59+
@warning The default value is `nil`
6160
*/
6261

6362
@property (nonatomic, strong) MKAnnotationView *defaultAnnotationView;

EPMapExtensions/EPUserPosition.h

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,47 @@
1919

2020

2121
///-------------------------------------------------
22-
/// Creating object
22+
/// @name Creating object
2323
///-------------------------------------------------
2424

2525
/**
26-
@param userLocation Takes the user location
26+
Initialize the object with the specified user location
27+
28+
@param userLocation Takes a valid user location
29+
2730
*/
2831

2932
- (id)initWithUserPosition:(CLLocation *)userLocation;
3033

3134
///-------------------------------------------------
32-
/// Updating user position
35+
/// @name Updating user position
3336
///-------------------------------------------------
3437

3538
/**
36-
Takes the fresh user position
39+
Updates the user location with a new valid one provided that it is a valid location far away at least `minThresholdToUpdatePosition` meters from the old position
40+
3741
@param newUserLocation New acquired user location
3842
*/
3943

4044
- (void)updatePosition:(CLLocation *)newUserLocation;
4145

46+
47+
///-------------------------------------------------
48+
/// @name Position updating property
49+
///-------------------------------------------------
50+
51+
/**
52+
Minimum threshold to get the user position updated
53+
*/
54+
55+
@property (nonatomic) CLLocationDistance minThresholdToUpdatePosition; //meters
56+
57+
58+
///-------------------------------------------------
59+
/// @name User position properties
60+
///-------------------------------------------------
61+
62+
4263
/**
4364
Contains the last valid user position
4465
*/
@@ -51,11 +72,6 @@
5172

5273
@property (nonatomic, readonly) NSDate *lastValidPositionDate;
5374

54-
/**
55-
Minimum threshold to get the user position updated
56-
*/
57-
58-
@property (nonatomic) CLLocationDistance minThresholdToUpdatePosition; //meters
5975

6076
/**
6177
Latitude and longitude relevant to the user position
@@ -65,4 +81,12 @@
6581

6682
@end
6783

68-
extern const CLLocationDistance TSMinimumDefaultThresholdToUpdateUserPosition;
84+
///-------------------------------------------------
85+
/// @name Default constants
86+
///-------------------------------------------------
87+
88+
/**
89+
Default threshold
90+
*/
91+
92+
extern const CLLocationDistance TSMinimumDefaultThresholdToUpdateUserPosition; // 100m

iOSMapExtension.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
);
459459
runOnlyForDeploymentPostprocessing = 0;
460460
shellPath = /bin/sh;
461-
shellScript = "/usr/local/bin/appledoc \\\n--project-name \"${PROJECT_NAME}\" \\\n--project-company \"Pacces\" \\\n--company-id \"com.pacces\" \\\n--docset-atom-filename \"${PROJECT_NAME}.atom\" \\\n--docset-feed-url \"${PROJECT_DIR}/%DOCSETATOMFILENAME\" \\\n--docset-package-url \"${PROJECT_DIR}/%DOCSETPACKAGEFILENAME\" \\\n--docset-fallback-url \"\" \\\n--output \"~/help\" \\\n--publish-docset \\\n--logformat xcode \\\n--keep-undocumented-objects \\\n--keep-undocumented-members \\\n--keep-intermediate-files \\\n--no-repeat-first-par \\\n--no-warn-invalid-crossref \\\n--verbose 6 \\\n--ignore \"*.m\" \\\n--ignore \"LoadableCategory.h\" \\\n--index-desc \"${PROJECT_DIR}/readme.markdown\" \\\n\"${PROJECT_DIR}\"";
461+
shellScript = "/usr/local/bin/appledoc \\\n--project-name \"${PROJECT_NAME}\" \\\n--project-company \"Pacces\" \\\n--company-id \"com.pacces\" \\\n--docset-feed-url \"http://prova.com/%DOCSETATOMFILENAME\" \\\n--docset-package-url \"http://prova.com/%DOCSETPACKAGEFILENAME\" \\\n--output \"~/help\" \\\n--logformat xcode \\\n--search-undocumented-doc \\\n--keep-undocumented-objects \\\n--keep-undocumented-members \\\n--keep-intermediate-files \\\n--no-repeat-first-par \\\n--publish-docset \\\n--no-warn-invalid-crossref \\\n--verbose 3 \\\n--ignore \"*.m\" \\\n--ignore \"LoadableCategory.h\" \\\n--index-desc \"${PROJECT_DIR}/readme.markdown\" \\\n\"${PROJECT_DIR}/EPMapExtensions\" || echo \"Failed -- ignoring\"\n";
462462
};
463463
84BE5FD91738018F0067CC40 /* ShellScript */ = {
464464
isa = PBXShellScriptBuildPhase;

readme.markdown

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ EPMapExtension is an extension library built on the top of [MKMapKit](http://dev
99
The library architecture is based on the
1010

1111
## MapViewDecorator
12-
12+
13+
MapViewDecorator is an attempt to deal with a considerable amount of customized annotationView spanning over the map without incurring in typical problems relevant to the trivial *switch-case, if-else if* control structures. In other words, it is a way to treat a good number of annotations and views in a more manageable and maintainable way.
1314

1415
### Registration of Annotations into MapDecorator
1516

@@ -18,7 +19,9 @@ The library architecture is based on the
1819

1920
### Advanced Configurations
2021

22+
## Customized MapView
23+
24+
This customized MapView adds some useful features on top of the MKMapView class. In fact, it enables to filter annotation via
2125

22-
###
2326

2427

0 commit comments

Comments
 (0)