我正在使用mapkit並在數據庫中的雙重類型中使用瘦代碼分配緯度和經度時出錯
double latitude1;
double longitude1;
@property (assign) double latitude1;
@property (assign) double longitude1;
緯度和經度但是當我寫這行時我收到錯誤:(
CLLocationCoordinate2D theCoordinate;
theCoordinate.latitude = [ classObj.latitude1 doubleValue];
theCoordinate.longitude = [ classObj.longitude1 doubleValue];
此錯誤發生 「無效接收類型雙「 我有浮動轉換但它也沒有工作..
您是否使用了@synthesize來生成getter?並且不要爲原始類型使用assign。 – 2011-05-11 11:40:23
'@synthesize latitude1,longitude1' – 2011-05-11 11:42:06