我不明白为什么我会收到这个错误.这是相关的代码:
Photo.h
#import <CoreData/CoreData.h>
@class Person;
@interface Photo : NSManagedObject
{
}
@property (nonatomic, retain) NSData * imageData;
@property (nonatomic, retain) NSNumber * Latitude;
@property (nonatomic, retain) NSString * ImageName;
@property (nonatomic, retain) NSString * ImagePath;
@property (nonatomic, retain) NSNumber * Longitude;
@property (nonatomic, retain) Person * PhotoToPerson;
@end
Run Code Online (Sandbox Code Playgroud)
Photo.m
#import "Photo.h"
#import "Person.h"
@implementation Photo
@dynamic imageData;
@dynamic Latitude;
@dynamic ImageName;
@dynamic ImagePath;
@dynamic Longitude;
@dynamic PhotoToPerson;
@end
Run Code Online (Sandbox Code Playgroud)
这是我创建的mapViewController.m类.如果我运行它,CLLocationDegrees CLLat和CLLong行:
CLLocationDegrees CLLat = (CLLocationDegrees)photo.Latitude;
CLLocationDegrees CLLong = (CLLocationDegrees)photo.Longitude;
Run Code Online (Sandbox Code Playgroud)
给我错误:指向预期浮点值的指针值. …