当我使用保存代码时,我收到decalres selector的错误@ 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;