I follow a tutorial from http://www.vellios.com/2010/08/16/core-location-gps-tutorial/ to make an app to show user's current location. It has a method called locationUpdate
- (void)locationUpdate:(CLLocation *)location {
    //locLabel.text = [location description];
    speedLabel.text = [NSString stringWithFormat:@"SPEED: %f", [location speed]];
    latitudeLabel.tex开发者_StackOverflow中文版t = [NSString stringWithFormat:@"LATITUDE: %f", location.coordinate.latitude];
    longitudeLabel.text = [NSString stringWithFormat:@"LONGITUDE: %f", location.coordinate.longitude];
    altitudeLabel.text = [NSString stringWithFormat:@"ALTITUDE: %f", [location altitude]];
}
How do i call location.coordinate.latitude outside this method?
Make a variable of CLLocation in your .h File, and then set that variable when the location updates (in the below method).
- (void)locationUpdate:(CLLocation *)location
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论