I'm trying to add mkannotation to my map, but the subtitle is not shown (or I don't know how to view it, I have an android device, and it's hard understand how the iphone works)
This is my MapPoint.h:
@interface MapPoint : NSObject<MKAnnotation> {
NSString *title;
NSString *subTitle;
CLLocationCoordinate2D coordinate;
}
@property (nonatomic,readonly) CLLocationCoordinate2D coordinate;
@property (nonatomic,copy) NSString *title;
@property (nonatomic,copy) NSString *subTitle;
-(id) initWithCoordinate:(CLLocationCoordinate2D) c title:(NSString *) t subTitle:(NSString *) st;
@end
My MapPoint.m:
@implementation MapPoint
@synthesize title,coordinate,subTitle;
-(id) initWithCoordinate:(CLLocationCoordinate2D)c title:(NSString*)t subTitle:(NSString *) st
{
coordinate = c;
[self setTitle:t];
[self setSubTitle:st];
return self;
}
@end
And in Map.m, I have:
MapPoint *mp = [[MapPoint alloc] initWithCoordinate:pointCoord title:@"This is the title" subTitle:@"This is the subtitle"];
[mv addAnnotation:mp];
I when i touch my marker, I only see "this is the title:
I suppose I have to see This is the title, and This is the subtitle with smaller font.
Thank you in advance