NSFileManager * fileManager = [NSFileManager defaultManager];
NSString * filePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents"] stringByAppendingPathComponent:[NSString stringWithFormat:@"camera%ld.png",currentBtn]];
//path 图片的本地路径
// CGSize size=[UIImage imageWithContentsOfFile:filePath].size;
CGImageRef imageRef = [[UIImage imageWithContentsOfFile:filePath] CGImage];
CGSize size = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));//这个size就是实际图片的像素大小 例如系统相册里的花, {1239,822}
//2、获得屏幕分辨率 scale:
CGFloat scale_screen = [UIScreen mainScreen].scale;
//所以要想展示 imageView上面图片的大小
UIImageView * imgView =[[UIImageView alloc]init] ;
imgView.center = self.view.center;
imgView.bounds = CGRectMake(0, 0, size.width/scale_screen, size.height/scale_screen);
imgView. image = [[ UIImage alloc ] initWithContentsOfFile :filePath ];
//第二种是苹果官方的
UIImageView * imgView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)] ;
imgView.image = [[UIImage alloc]initWithContentsOfFile:filePath ];
imgView.contentMode = UIViewContentModeScaleAspectFit;// 关于介绍 contentMode : http://blog.csdn.net/annkie/article/details/49247755
[self.view addSubview:imgView];