NSData *imageData = UIImageJPEGRepresentation(PhotoImage, 100);
NSString* queryString = ;
[SQLiteAccess insertWithSQL:
[NSString stringWithFormat:@"insert into images (photo) values ('%@')", imageData] // photo - blob column
]; // i use class SQLiteaccess
挿入は通常ですが、sqliteから画像を読み取ると
NSArray *photoSelectArray = [SQLiteAccess selectManyRowsWithSQL: [NSString stringWithFormat:@"select photo from places where id=%i", idPlace]];
NSDictionary *imageDataDic = [photoSelectArray objectAtIndex:0];
NSData *dataForCachedImage = [[NSData alloc] initWithData: [imageDataDic objectForKey:@"photo"]];
UIImage *cachedImage = [UIImage imageWithData:dataForCachedImage];
エラーが発生しました - SIGABRT(Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString bytes]: unrecognized selector sent to instance 0x1e5c46d0')
sqlite に簡単にアクセスするための ps クラス - SQLiteAccess.h - http://pastebin.com/BFxFry7T - SQLiteAccess.m - http://pastebin.com/m67yNVLm