【发布时间】:2013-03-01 10:27:06
【问题描述】:
AM 试图将 CLLocationCoordinate2D[] 添加到 NSMutableArray 并将其作为参数发送。但是 (__bridge id) 正在使应用程序崩溃。结构到 id 的转换是问题所在。任何人都可以请让我知道如何使用它。
CLLocationCoordinate2D 坐标[1000];
coordinates[index] --- 循环添加的所有坐标。
NSMutableArray *coorArray = [NSMutableArray array];
[coorArray addObject:(__bridge id)(coordinates)]; crashes here
【问题讨论】:
-
如果我理解正确,你想创建一个 CLLocationCoordinate2D 的数组?
标签: objective-c struct cllocation bridge