User Tools

Site Tools


ios-labs-s14:class-08

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
ios-labs-s14:class-08 [2014/02/28 01:16]
mbarboi
ios-labs-s14:class-08 [2014/02/28 14:41]
mbarboi [Create Annotation Object]
Line 216: Line 216:
   -Have it implement the protocol MKAnnotation by typing "<​MKAnnotation>"​ immediately after the superclass name in the header file   -Have it implement the protocol MKAnnotation by typing "<​MKAnnotation>"​ immediately after the superclass name in the header file
   -Import it into MapRoot   -Import it into MapRoot
 +  -Add the following properties to the header file
  
-When the user touches the trips button ​(the car iconyou should add the annotations. The method for adding annotations to a map is called //​addAnnotation//​. Create a new annotation object for each coordinate ​and add it to the map.+<​code>​ 
 +@property ​(nonatomic, copyNSString * title; 
 +@property (nonatomic, copy) NSString * subtitle; 
 +@property (nonatomic, assign) CLLocationCoordinate2D ​coordinate
 +</​code>​
  
 +When the user touches the trips button (the car icon) you should add the annotations. The method for adding annotations to a map is called //​addAnnotation//​. Create a new annotation object for each coordinate and add it to the map.
 ====Create Overlay==== ====Create Overlay====
   -Copy the following methods into MapRoot:   -Copy the following methods into MapRoot:
ios-labs-s14/class-08.txt · Last modified: 2014/02/28 14:55 by mbarboi