IOS overlooked small Knowledge points summary

Source: Internet
Author: User

1.iOS when setting the shadow, the Shadowoffset default value is {0,-3}, along the offset distance from X Y, Shadowradius controls the blur of the shadow, not the fillet size. When the Core animation calculates the shadows, it takes the homestay map into account, and when you use Maskstobounds, you use two layers to solve the shadows being cut. With Shadowpath, you can make hard and hard shapes independently of the layer shape.

2.iOS Calayer Contents Property Assignment Uiimage.cgimage may not work and need to be bridged to display.

The layer's opacity setting transparency affects sublayers.

3.iOS Calayer When you set a border, you actually add a layer of masks.

4. Solve the problem of group transparency: Enable the Shouldrasterize property, we set the layer's Rasterizationscale property. By default, all layer stretches are 1.0, so if you use the Shouldrasterize property, you need to make sure you set the Rasterizationscale property to match the screen to prevent the retina screen from being pixelated.

5.catransform3d the M34 element, used to do the perspective default is 0??,calayer have doublesided when no, do 3D transform when do not draw back

6.CATextLayer can be a good solution to rich text problems

IOS overlooked small Knowledge points summary

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.