string to double conversion in iphone
i tried assigning values like this ,where coffeshop is an object with latitude a string variable,however value of coordinates are shown 0 values,while i nslog the coffeeshop.latitude and longitude i am getting correct values,is there any error in this conversion
CLLoca开发者_运维知识库tionCoordinate2D coordinate;
coordinate.latitude=[coffeeshop.latitude doubleValue];
coordinate.longitude=[coffeeshop.latitude doubleValue];
Hello
I sure it's a culture problem
you must check your string format
I got the same error cause my String contraint coma separator instead of point.
try to replace "," for "." (something like this) in the string
精彩评论