Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What I didn't realize is that UICRouteAnnotation needed to be modified to accept a subtitle. Here is my updated h and m files for UICRouteAnnotation. Making the below changes fixed my issue so the code I posted in my question works as intended.</p> <p>Thanks Anna for pointing me in the right direction.</p> <p>.h file</p> <pre><code>#import &lt;Foundation/Foundation.h&gt; #import &lt;MapKit/MapKit.h&gt; typedef enum UICRouteAnnotationType { UICRouteAnnotationTypeStart, UICRouteAnnotationTypeEnd, UICRouteAnnotationTypeWayPoint, } UICRouteAnnotationType; @interface UICRouteAnnotation : NSObject&lt;MKAnnotation&gt; { CLLocationCoordinate2D coordinate; NSString *title; NSString *subtitle; UICRouteAnnotationType annotationType; } @property (nonatomic) CLLocationCoordinate2D coordinate; @property (nonatomic, readonly, copy) NSString *title; @property (nonatomic, readonly, copy) NSString *subtitle; @property (nonatomic) UICRouteAnnotationType annotationType; - (id)initWithCoordinate:(CLLocationCoordinate2D)coord title:(NSString *)aTitle subtitle:(NSString *)aSubTitle annotationType:(UICRouteAnnotationType)type; @end </code></pre> <p>.m file</p> <pre><code>#import "UICRouteAnnotation.h" @implementation UICRouteAnnotation @synthesize coordinate; @synthesize title; @synthesize subtitle; @synthesize annotationType; - (id)initWithCoordinate:(CLLocationCoordinate2D)coord title:(NSString *)aTitle subtitle:(NSString *)aSubTitle annotationType:(UICRouteAnnotationType)type { self = [super init]; if (self != nil) { coordinate = coord; title = [aTitle retain]; subtitle = [aSubTitle retain]; annotationType = type; } return self; } - (void)dealloc { [title release]; [subtitle release]; [super dealloc]; } @end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload