开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜