Setting the cause and effect of masks to Yes when working on a layer

Source: Internet
Author: User

I've never been able to figure out why to set button.layer.masksToBounds = YES Now that I've been setting the border and rounded corners for the view Image view Button.

When you get to know masks, you'll understand why this is going to work. "A layer can have a


The associated mask mask is a bitmap that has an alpha value when the pixel is merged with the pixels it contains


The mask is applied to the pixels of the layer. When you want to set the fillet radius of a layer, you can effectively


Set a mask above the layer. However, you can also specify any mask. For example, a shape of a letter A


Mask It will only show up in mask (that is, the part of the layer).


For more specific drawing and compositing of pixels, see:


http://blog.csdn.net/u010670117/article/details/44082391


Setting the cause and effect of masks to Yes when working on a layer

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.