I'm trying to convert CLLocation
latitude / longitude to a string. I can successfully do this with the follow code:
// extract latitude from CLLocation object and cast to string
NSString *latitude = [[NSString alloc] initWithFormat:@"%g°", location.coordinate.latitude];
this gives me a value like: 34.10111º. I would like this number as a pure string without the º degree symbol.
Should I init the string with a different format?
I tried initing with the format @"%d" and the string comes out to a different number altogether.