摘要: 最近工作中,遇到一个需求,需要把一个UIView对象转成UIImage对象显示。经过网络搜索,找到如下答案:1 -(UIImage*)convertViewToImage:(UIView*)v{2 CGSize s = v.bounds.size;3 UIGraphicsBeginImageContext(v.bounds.size);4 [v.layer renderInContext:UIGraphicsGetCurrentContext()];5 UIImage*image = UIGraphicsGetImageFromCurrentImageConte... 阅读全文
posted @ 2013-11-25 13:25 ubersexual 阅读(625) 评论(0) 推荐(0) 编辑