Hello.
I'm developing an iPhone application and I getting that warning at method:
NSNumber *latitudeValue;
NSNumber *longitudeValue;
[self obtainLatitude:latitudeValue longitude:longitudeValue];
The method is declared as follows:
- (void) obtainLatitude:(NSNumber *)latitudeValue longitude:(NSNumber *)longitudeValue {
NSNumberFormatter * f = [[NSNumberFormatter alloc] init];
[f setNumberStyle:NSNumberFormatterDecimalStyle];
latitudeValue = [f numberFromString:[latitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]];
longitudeValue = [f numberFromString:[longitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]];
[f release];
}
As you can see, I'm trying to calculate latitudeValue
and longitudeValue
calling obtainLatitude:longitude:
but I'm doing something wrong.
How can I fix that error?