IOS performance instruments core Animation

Source: Internet
Author: User

This article will show you how the pixels of instruments are not aligned. That is, misaligned image.

What are the consequences? It is not very serious, but it will increase the burden on your GPU, that is, when the draw content, the GPU will do some processing before the display, but this is not necessary for it, and it can be completely avoided.


What can I find out?

It mainly enables the system draw action to be more efficient.


Let's talk about its specific usage and meaning:

First of all, I won't talk about how to run instruments. If I don't know it, I won't look at it below. I haven't studied performance yet.

After the instrument runs, select core animation.




Then your program runs. See. The selected option should display two colors in your app: yellow or purple.

Yellow is good ~ Don't worry, because some of the system's controls are highlighted in yellow, which means that the area is stretched.

There is still some benefit in stretching words, reducing memory and program size.

What you really need to care about is the purple region: subpixel misalignment, pixels are not aligned,

How can this problem be solved? Simple!

First, check whether your resources are in singular pixels? If yes, please let the child out of the resource give you two more pixels on the edge, so that you can make an even number, and the retain screen should be a multiple of 4 as much as possible. In this way, there will be no singular number in alignment and layout.

The second case is whether there is a custom control or a frame of some controls. You can obtain it through computation. The explanation must be a decimal number, that is, a half pixel.

So ......





This problem is fixed!

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.