IOS-self.layer.shouldRasterize Properties

Source: Internet
Author: User

IOS-self.layer.shouldRasterize Properties

Document explanation:

/* When true, the layer is rendered as a bitmap in its local coordinate * space ("rasterized"), then the bitmap is composited into the * destination (with the minificationFilter and magnificationFilter * properties of the layer applied if the bitmap needs scaling). * Rasterization occurs after the layer's filters and shadow effects * are applied, but before the opacity modulation. As an implementation * detail the rendering engine may attempt to cache and reuse the * bitmap from one frame to the next. (Whether it does or not will have * no affect on the rendered output.) * * When false the layer is composited directly into the destination * whenever possible (however, certain features of the compositing * model may force rasterization, e.g. adding filters). * * Defaults to NO. Animatable. */

When shouldRasterize is set to true, the layer is rendered as a bitmap and cached. It will not be rendered again in the next use. The implementation of the rounded corner itself is a mix of colors (blending). If the page is blending every time it comes out, it consumes too much, then shouldRasterize = yes, next time, we simply read the bitmap from the cache of the rendering engine to save system resources.

If you perform the rounded corner setting every time when you scroll the tableView, the UI will be blocked. setting this will make the sliding smoother.

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.