开发者

how to load uiimage to openflow using nsdata

开发者 https://www.devze.com 2023-03-22 11:22 出处:网络
the openflow library load image to cover using [(AFOpenFlowView*)self.view setImage:[UIImage imageNamed:imageName] forindex:i],the images are copied into the project.

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:path

[(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??

0

精彩评论

暂无评论...
验证码 换一张
取 消