1.设置要截屏的图片大小
UIGraphicsBeginImageContrxt();
2.对那个视图截屏
[view.layer randerInContext:UIGraphicsGetCurrentContext()];
3.获取截屏的图片对象
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
4.结束绘制图片
UIGraphicEndImageContext();
5.保存相册的图片对象
UIImageWriteToSavedPhotoAlbum(image,nil,nil,nil,);