iphone - How to get the title and subtitle for a pin when we are implementing the MKAnnotation? -


I have implemented the Mk animation as below. I will keep a lot of pins and information about all those pins is stored in an array Is performed. Each member of this array is an object whose property will give value to the pin's subtitle and title. Every object matches a pin but when I click on the pin, how can I display these values?

  @ Interface user annotation: NSBJack & lt; MKAnnotation & gt; {CLLocationCoordinate2D Coordination; NSString * title; NSString * subtitles; NSSTING * city; NSSTING * Province; } @ Property (Nonatomatic, Assign) CLLocation Coordinate 2D Coordination; @property (nonatomic, retain) NSString * header; @product (nontomic, retten) nsstaining * subtitles; @protecti (nanatomic, retten) nssting * city; @property (nonatomic, retain) NSString * province; - (id) initWithCoordinate: (CLLocationCoordinate2D) c;  

More. M is

  @implementation UserAnnotation @ synthesis coordination, title, subtitle, city, province; - (NSString *) Title {Return Title; } - (NSString *) subtitles {Return subtitles; } - (NSString *) city {return city; } - (NSString *) Province [Return Province; } - (id) initWithCoordinate: (CLLocationCoordinate2D) c {coordinate = c; NSLog (@ "% f,% f", c.latitude, c.longitude); Self return; } @ And  

The two rows were added and everyone was done.

annView.canShowCallout = Yes; AnnView.calloutOffset = CGExMake (-5, 5);

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -