I need to format my coordinates like this:
N 61° 14.5919'
E 23° 28.1751'
Now my coordinates look like this:
61.145919
23.281751
My code:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
latitudeLabel.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.latitude];
longitudeLabel.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.longitude];
}
This existing question seems to have suggestions for how to best solve, plus a library that can do it for you:
Convert decimal coordinate into degrees, minutes, seconds, direction