当我使用保存代码时,我得到@ interface
的错误"secondViewController"
声明了选择器getcachedirectorypath
。我用了
@interface getCacheDirectoryPath : UIImagePickerController
在.h文件中。 下面是.m文件
-(UIImage *)getImageFromCacheWithName:(NSString *)name
{NSString *_imagePath =[NSString stringWithFormat:@"%@/%@.png",[self getCacheDirectoryPath],name];
if([[NSFileManager defaultManager]fileExistsAtPath:_imagePath])
{UIImage *_image =[UIImage imageWithContentsOfFile:_imagePath];
return _image;
}
return nil;