title: How can I share the variable for mapkit between two viewcontroller?
body: <p>I want to show the pin annotation on the new view controller  when the "map" button is clicked on the upper level view controller.</p>
  
  <p>So I used the "IBAction" method on the method file of the upper level controller as below.
  Then the latitude and longitude values appeared normally (in the NSLog) from the property list.
  But I can't see the pin annotation on the new view controller. </p>
  
  <p>However, if I put the code marked "code for viewDidLoad" on the new view controller (named "location") then I can see the pin annotation.
  But the latitude and longitude value is only 0.00000. </p>
  
  <p>I think the variable isn't shared between two view controller.
  Please help me to solve this problem. </p>
  
  <pre><code>- (IBAction) goAddView:(id)sender {
  
  // the code for viewDidLoad  
      double myLat = [[drink objectForKey:lati_KEY] doubleValue];
      double myLong = [[drink objectForKey:long_KEY] doubleValue];                CLLocationCoordinate2D theCoordinate;
       theCoordinate.latitude =  myLat;
       theCoordinate.longitude = myLong;
       NSLog(@"the latitude = %f",theCoordinate.latitude);
       NSLog(@"the longitude = %f",theCoordinate.longitude);
  
       myAnnotation *myAnnotation1=[[myAnnotation alloc] init];
  
       myAnnotation1.coordinate=theCoordinate;
       myAnnotation1.title=@"Destination";
       myAnnotation1.subtitle=@"in the city";
       [self.mapView addAnnotation:myAnnotation1]; 
  // the code end
  
      location *lm= [[location alloc] initWithNibName:@"location" bundle:nil];
      [self.navigationController pushViewController:lm animated:YES];
  </code></pre>