UIView转UIImage(截屏,UIGraphicsBeginImageContextWithOptions函数的使用)
2014-11-16 12:58
399 查看
UIView转UIImage(截屏,UIGraphicsBeginImageContextWithOptions函数的使用)
2012-11-06 13:56:59| 分类: iphone_dev_note|举报|字号 订阅// 需要转成image的view:captureAndSaveView
UIGraphicsBeginImageContextWithOptions(captureAndSaveView.frame.size, NO, 1.0); //NO,YES 控制是否透明
[captureAndSaveView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// 生成后的image
相关文章推荐
- UIGraphicsBeginImageContextWithOptions使用及注意事项
- UIGraphicsBeginImageContext与UIGraphicsBeginImageContextWithOptions的区别
- UIGraphicsBeginImageContext 和 UIGraphicsBeginImageContextWithOptions
- IOS UIGraphicsBeginImageContextWithOptions 版本适配问题
- iOS - Quart2D绘图之UIGraphicsBeginImageContextWithOptions基础2
- UIGraphicsBeginImageContext 和 UIGraphicsBeginImageContextWithOptions
- UIGraphicsBeginImageContextWithOptions的用法
- 利用UIImagePickerController或者利用UIKit的 UIGraphicsBeginImageContext保存图片
- IOS UIGraphicsBeginImageContext 使用简介
- iOS: CGContext的函数CGContextBeginTransparencyLayerWithRect
- stretchableImageWithLeftCapWidth:topCapHeight:函数用法 总结 (UIImage)
- [UIView beginAnimations:context:]与[UIView animateWithDuration:animations:]值得注意的一个区别
- [UIImage resizableImageWithCapInsets:]使用注意
- [UIView beginAnimations:context:]与[UIView animateWithDuration:animations:]值得注意的一个区别
- 解决 UIView 设置背景为UIImage图片变型问题[XXX setBackgroundColor:[UIColor colorWithPatternImage:XXX]];
- ios--截屏--UIGraphicsBeginImageContext(CGSize)
- ios--图片处理(修改、保存)UIGraphicsBeginImageContext
- boundingRectWithSize:options:attributes:context:计算尺寸的使用
- [UIImage resizableImageWithCapInsets:]使用注意
- UIGraphicsBeginImageContext系列知识