首页 > 其他 > 详细

Chapter 19 Subclassing UITableViewCell

时间:2014-10-04 20:45:57      阅读:283      评论:0      收藏:0      [点我收藏+]

Chapter 19 Subclassing UITableViewCell

 

1. iOS provides a convenient suite of functions to create offscreen contexts and produce images from them. To create an offscreen image context, you use the function UIGraphicsBeginImageContextWithOptions. This function accepts a CGSize structure that specifies the width and height of the image context, a scaling factor, and whether the image should be opaque. When this function is called, a new CGContextRef is created and becomes the current context.

To draw to a CGContextRef, you use Core Graphics, just as though you were implementing a drawRect: method for a UIView subclass. To get a UIImage from the context after it has been drawn, you call the function UIGraphicsGetImageFromCurrentImageContext.

Once you have produced an image from an image context, you must clean up the context with the function UIGraphicsEndImageContext.

Chapter 19 Subclassing UITableViewCell

原文:http://www.cnblogs.com/1oo1/p/4006251.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!