标签:
oc中的可变数组NSMutableArray里面只能存放object,对于结构体类型,必须进行转换才能放入可变数组
NSMutableArray *coordinateArray = [NSMutableArray array];
CLLocationCoordinate2D coor;
coor.latitude = item.latitude;
coor.longitude = item.longitude;
NSValue *value = [NSValue value:&coor withObjCType:@encode(CLLocationCoordinate2D)];
[coordinateArray addObject:value];
标签:
原文地址:http://www.cnblogs.com/wangbaixue/p/5283749.html