0

尝试设置图像数据

NSData *thumbnailData = UIImageJPEGRepresentation(place.thumbnail, 0.8);
            [placeDict setObject:thumbnailData forKey:thumbnail];

并得到错误:

Could not messagepack object: External Data Reference: <self = 0xbba24f0 ; path = nil ; length = 557>
4

1 回答 1

1

您确定在这行代码之后收到此错误吗?使用此代码可以确定您的程序在这部分代码中有/没有错误:

NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
NSData *thumbnailData = UIImageJPEGRepresentation(place.thumbnail, 0.8);
NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
placeDict setObject:thumbnailData forKey:thumbnail];
NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
于 2012-12-11T11:14:36.783 回答