我正在获取本地保存的图像 url,现在我正在尝试将其转换为字符串。我知道absoluteString
将 url 转换为字符串的方法,但在这种情况下不起作用。
我的网址是这样的(文件://本地主机/用户.......)
NSString * imagestring = [entryObject.imageurl absoluteString];
但它的抛出错误 unrecognized selector sent to instance 0xc36c410
。我不知道为什么会这样
这是我的对象类
@interface EntryObject : NSObject
@property (nonatomic, strong) NSString *descString;
@property (nonatomic, strong) UIImage *photoImage;
@property (nonatomic, strong) NSURL * imageurl;
@property (nonatomic, strong) NSString *dairyId;
@property (nonatomic, strong) NSString *eventId;
@property (nonatomic, strong) NSString *dateString;
@property (nonatomic, strong) NSString *monthwiseSeparate_String;
@property (nonatomic,strong) NSString *sortedString;
@property (nonatomic,strong) NSData * entryimagedata;