fixes #158: add support for callout subtitle via annotation subtitle
Showing
3 changed files
with
8 additions
and
1 deletions
@@ -62,6 +62,9 @@ | @@ -62,6 +62,9 @@ | ||
62 | /** The annotation's title. */ | 62 | /** The annotation's title. */ |
63 | @property (nonatomic, retain) NSString *title; | 63 | @property (nonatomic, retain) NSString *title; |
64 | 64 | ||
65 | +/** The annotation's subtitle. */ | ||
66 | +@property (nonatomic, retain) NSString *subtitle; | ||
67 | + | ||
65 | /** Storage for arbitrary data. */ | 68 | /** Storage for arbitrary data. */ |
66 | @property (nonatomic, retain) id userInfo; | 69 | @property (nonatomic, retain) id userInfo; |
67 | 70 |
@@ -38,6 +38,7 @@ | @@ -38,6 +38,7 @@ | ||
38 | 38 | ||
39 | @synthesize coordinate; | 39 | @synthesize coordinate; |
40 | @synthesize title; | 40 | @synthesize title; |
41 | +@synthesize subtitle; | ||
41 | @synthesize userInfo; | 42 | @synthesize userInfo; |
42 | @synthesize annotationType; | 43 | @synthesize annotationType; |
43 | @synthesize annotationIcon, badgeIcon; | 44 | @synthesize annotationIcon, badgeIcon; |
@@ -65,6 +66,7 @@ | @@ -65,6 +66,7 @@ | ||
65 | self.mapView = aMapView; | 66 | self.mapView = aMapView; |
66 | self.coordinate = aCoordinate; | 67 | self.coordinate = aCoordinate; |
67 | self.title = aTitle; | 68 | self.title = aTitle; |
69 | + self.subtitle = nil; | ||
68 | self.userInfo = nil; | 70 | self.userInfo = nil; |
69 | self.quadTreeNode = nil; | 71 | self.quadTreeNode = nil; |
70 | 72 | ||
@@ -86,6 +88,7 @@ | @@ -86,6 +88,7 @@ | ||
86 | - (void)dealloc | 88 | - (void)dealloc |
87 | { | 89 | { |
88 | self.title = nil; | 90 | self.title = nil; |
91 | + self.subtitle = nil; | ||
89 | self.userInfo = nil; | 92 | self.userInfo = nil; |
90 | self.layer = nil; | 93 | self.layer = nil; |
91 | [[self.mapView quadTree] removeAnnotation:self]; | 94 | [[self.mapView quadTree] removeAnnotation:self]; |
@@ -1705,7 +1705,8 @@ | @@ -1705,7 +1705,8 @@ | ||
1705 | 1705 | ||
1706 | _currentCallout = [SMCalloutView new]; | 1706 | _currentCallout = [SMCalloutView new]; |
1707 | 1707 | ||
1708 | - _currentCallout.title = anAnnotation.title; | 1708 | + _currentCallout.title = anAnnotation.title; |
1709 | + _currentCallout.subtitle = anAnnotation.subtitle; | ||
1709 | 1710 | ||
1710 | if (anAnnotation.layer.leftCalloutAccessoryView) | 1711 | if (anAnnotation.layer.leftCalloutAccessoryView) |
1711 | { | 1712 | { |
-
Please register or login to post a comment