Ios graphics and plotting

Source: Internet
Author: User

1. ios provides two high-quality graphics rendering Methods: a. OpenGL ES for rendering B. Quartz, Core Animation, and UIKit for rendering

2. the OpenGL ES framework is mainly applicable to game or high frame rate application development. The C language-based interface is used to create 2D and 3D content.

UIKit Graphics System

3. All the pictures in iOS, No matter OpenGL ES, Quartz, UIKit, or Core Animation, occur in the area of the UIView object.

4. You can call drawRect to call UIView to trigger view update in the following situations:

A. Remove or delete other views of the blocked View

B. Set the hidden attribute to NO so that it changes from hidden to display.

C. will try to get out of the screen and return to the screen again

D. Call setNeedsDisplay or setNeedsDisplayInRect.

5. Ways to Improve the Performance of plotting:

A. Minimize the repainted Area

B. Try to make the view area opaque and set opaque to YES.

C. delete the alpha channel in the opaque PNG file. Deleting the alpha channel of the opaque PNG file can avoid the fusion operation on the layers that contain the image, thus greatly simplifying the image synthesis, this improves the plotting performance.

D. reuse existing views during Rolling

E. Avoid clearing the original content during the rolling process. By default, UIKit clears the context buffer of a region before calling the drawRect method to update a region of the view. If the buffer is cleared during the scrolling process, it is very costly. You can set the clearsContextBeforeDrawing attribute to NO.

Related Article

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.