Chapter 19 subclassing uitableviewcell

Source: Internet
Author: User

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 uigraphicsbeginimagecontextwitexceptions. this function accepts a cgsize structure that specifies the width and height of the image context, a scaling factor, and whether the image shocould 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.