保存当前view到相册
import <QuartzCore/QuartzCore.h>
要响应的方法里面添加:
UIGraphicsBeginImageContext(currentView.bounds.size); //currentView 当前的view [currentView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); |