【发布时间】:2012-06-22 19:50:57
【问题描述】:
我想检索现在在字符串中的数据的纬度和经度。为了使用它,它必须被转换成一个浮点数,所以我可以在这里使用它而不是浮点数:
//Create a region
mapview.mapType = MKMapTypeSatellite;
MKCoordinateRegion newRegion;
newRegion.center.latitude = 47.808435,
newRegion.center.longitude = 9.643743;
newRegion.span.latitudeDelta = 0.00472;
newRegion.span.longitudeDelta = 0.006899;
CLLocationCoordinate2D coordinate;
coordinate.latitude = 47.808435;
coordinate.longitude = 9.643743;
我只知道如何将字符串转换为数据,但不知道如何将其转换为浮点数。有人知道吗?
【问题讨论】:
-
maplatitude怎么可能既是图像(您将其分配给storyimageView) 又是 浮点数? -
我的错。我才发现我抄错了。会修复它,所以没有人会感到困惑。
标签: objective-c xcode4 xcode4.2