Skip to content

Commit 98825b8

Browse files
committed
Merge pull request #66 from ParsePlatform/nlutsenko.geopoint
Add better subclassing support to PFGeoPoint.
2 parents cf51bc6 + 53630ff commit 98825b8

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Parse/Internal/PFGeoPointPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ extern const double EARTH_RADIUS_KILOMETERS;
2828
/*!
2929
Creates an GeoPoint from its encoded format.
3030
*/
31-
+ (PFGeoPoint *)geoPointWithDictionary:(NSDictionary *)dictionary;
31+
+ (instancetype)geoPointWithDictionary:(NSDictionary *)dictionary;
3232

3333
@end

Parse/PFGeoPoint.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef void(^PFGeoPointResultBlock)(PFGeoPoint *PF_NULLABLE_S geoPoint, NSError
3535
3636
@returns Returns a new `PFGeoPoint`.
3737
*/
38-
+ (PFGeoPoint *)geoPoint;
38+
+ (instancetype)geoPoint;
3939

4040
/*!
4141
@abstract Creates a new `PFGeoPoint` object for the given `CLLocation`, set to the location's coordinates.
@@ -44,7 +44,7 @@ typedef void(^PFGeoPointResultBlock)(PFGeoPoint *PF_NULLABLE_S geoPoint, NSError
4444
4545
@returns Returns a new PFGeoPoint at specified location.
4646
*/
47-
+ (PFGeoPoint *)geoPointWithLocation:(PF_NULLABLE CLLocation *)location;
47+
+ (instancetype)geoPointWithLocation:(PF_NULLABLE CLLocation *)location;
4848

4949
/*!
5050
@abstract Create a new `PFGeoPoint` object with the specified latitude and longitude.
@@ -54,7 +54,7 @@ typedef void(^PFGeoPointResultBlock)(PFGeoPoint *PF_NULLABLE_S geoPoint, NSError
5454
5555
@returns New point object with specified latitude and longitude.
5656
*/
57-
+ (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude;
57+
+ (instancetype)geoPointWithLatitude:(double)latitude longitude:(double)longitude;
5858

5959
/*!
6060
@abstract Fetches the current device location and executes a block with a new `PFGeoPoint` object.

Parse/PFGeoPoint.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ @implementation PFGeoPoint
2626
#pragma mark - Init
2727
///--------------------------------------
2828

29-
+ (PFGeoPoint *)geoPoint {
29+
+ (instancetype)geoPoint {
3030
return [[self alloc] init];
3131
}
3232

33-
+ (PFGeoPoint *)geoPointWithLocation:(CLLocation *)location {
33+
+ (instancetype)geoPointWithLocation:(CLLocation *)location {
3434
return [self geoPointWithLatitude:location.coordinate.latitude
3535
longitude:location.coordinate.longitude];
3636
}
3737

38-
+ (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude {
39-
PFGeoPoint *gpt = [PFGeoPoint geoPoint];
38+
+ (instancetype)geoPointWithLatitude:(double)latitude longitude:(double)longitude {
39+
PFGeoPoint *gpt = [self geoPoint];
4040
gpt.latitude = latitude;
4141
gpt.longitude = longitude;
4242
return gpt;
@@ -111,7 +111,7 @@ - (NSDictionary *)encodeIntoDictionary {
111111
};
112112
}
113113

114-
+ (PFGeoPoint *)geoPointWithDictionary:(NSDictionary *)dictionary {
114+
+ (instancetype)geoPointWithDictionary:(NSDictionary *)dictionary {
115115
return [[self alloc] initWithEncodedDictionary:dictionary];
116116
}
117117

0 commit comments

Comments
 (0)