My problem is tat when i get location from locationManager it sometimes doesn’t load right. So i want to check if my location is different than 0.0000000. To do so i convert coordinate to string. And then with compare that string with isEaqual to that.
NSMutableString *nicla=@"0.0000000";
while(true){
cLoc=appDelegate.currentLocaiton;
lat=[NSString stringWithFormat:@"%f", [cLoc coordinate].latitude];
lng=[NSString stringWithFormat:@"%f", [cLoc coordinate].longitude];
NSLog(@"Execution Time: %f lat: %p lng: %p", executionTime, lat, lng);
NSLog(lat);
NSLog(lng);
NSLog(nicla);
if([lat isEqual:nicla]){ }
else break;
}
I also tryied isEaqualToString but same result, in my logs those are identicaly strings…
longitudeandlatitudeare just double values, why would you want to convert them to NSString to compare them? Just use