gpt4 book ai didi

ios - 从不兼容的类型id_nullable分配给cllocationdegrees('aka double')

转载 作者:行者123 更新时间:2023-12-01 20:06:11 26 4
gpt4 key购买 nike

NSString* lat,*longi; 
lat= [[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"];

NSLog(@"LATITUDE %@",lat); longi= [[deliveryInfo objectAtIndex:0]valueForKey:@"longitude"];

c.latitude=[[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"];

c.longitude=-74.0565298; sp.latitudeDelta=0.01f; sp.longitudeDelta=0.01f;

re.center=c; re.span=sp; mapView.region=re; MKPointAnnotation *p=[[MKPointAnnotation alloc]init];

p.coordinate=c; [p setTitle:@"USA"];

[p setSubtitle:@"Location"]; [mapView addAnnotation:p];

最佳答案

c.latitude=[[[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"] floatValue]; c.longitude=[[[deliveryInfo objectAtIndex:0]valueForKey:@"longitude"]floatValue]; 
sp.latitudeDelta=0.01f;
sp.longitudeDelta=0.01f;
re.center=c;
re.span=sp;
mapView.region=re;

关于ios - 从不兼容的类型id_nullable分配给cllocationdegrees('aka double'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38811587/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com