UIView换UIImage
来源:互联网 发布:淘宝淘抢购 编辑:程序博客网 时间:2024/06/06 04:07
// 把一个View视图转换为Image-(UIImage *)getImageFromView{ UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 44)]; redView.backgroundColor = [UIColor redColor]; //UIGraphicsBeginImageContext(theView.bounds.size); UIGraphicsBeginImageContextWithOptions(redView.bounds.size, YES, redView.layer.contentsScale); [redView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image=UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }
0 0
- UIView换UIImage
- UIView转化成UIImage
- UIView 转 UIImage
- UIView 转 UIImage IOS
- UIView转UIImage
- UIView 转化成UIImage
- UIView截取图片UIimage
- UIView转UIImage
- UIView 转 UIImage
- UIview转换UIimage
- UIView转成UIImage
- uiview转换成uiimage
- IOS 将UIView转成UIImage
- ios UiView转换成UIImage
- iOS UIView、UIImage、NSData转换
- 将UIView转成UIImage,将UIImage转成PNG/JPG
- 将UIView转成UIImage,将UIImage转成PNG/JPG
- UIView 转化为 UIImage,将UIImage 保存到沙盒中
- 设计模式--单例模式
- mybatis使用generator自动生成代码时的类型转换
- XDOJ1101 - 提耶利亚的空间切割
- Windows驱动开发基础(五)驱动程序的数据结构
- C语言中的static变量
- UIView换UIImage
- 链表
- GetWindowRect和GetClientRect的区别详解
- Oracle GoldenGate Install For Linux
- LeetCode之旅(1)
- Rotate List
- 行内元素与块级元素比较全面的区别和转换
- Convert Sorted Array to Binary Search Tree
- Mongo使用