How can i use a variable created in a objective c Void function?
- by James
Im trying to get the lat and long values generated in a void function and use them within another function. Any help grateful.
(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
float latDeg = newLocation.coordinate.latitude;
NSLog(@"Lat: %g", latDeg);
float longDeg = newLocation.coordinate.longitude;
NSLog(@"Lat: %g", longDeg);
}
I want to use the latDeg and longDeg variables.