您的位置:首页 > 其它

iPhone中保存当前view到相册

2009-08-20 21:06 169 查看
#import <QuartzCore/QuartzCore.h>
要响应的方法里面添加:
UIGraphicsBeginImageContext(currentView.bounds.size);     //currentView 当前的view
[currentView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: