the openflow library load image to cover using
[(AFOpenFlowView*)self.view setImage:[UIImage imageNamed:imageName] forindex:i]
,the images are copied into the project.
now I want to load UIImage
from NSData
(the image files is in cache direcotry)
NSData *data=......
the file's path is like this path="../.../Documents/Cache/Aqualung1.jpg"
I load it to NSData
using datawithcontentsoffile:pat
h
[(AFOpenFlowView*)self.view setImage:[UIImage开发者_如何转开发 imageWithData:data] forindex:i]
But it errors in setImage
:
AFOpenFlowView:
-(void)setImage:(UIImage *)image for Index:(int)index{
....
[CoverImages setObject:setObject:ImageWithRelection forKey:coverNumber];
....
}
reason:-[NSCFDictionary setObject:forkey];
attempt to insert nil value
what should i do??
精彩评论