iOS Development note--layer layer fillets, borders, shading other common actions

Source: Internet
Author: User

  1. #import <QuartzCore/QuartzCore.h>//Add system framework
  2. Layer. backgroundcolor = [Uicolor cyancolor]. Cgcolor; //Add a background color to the layer
  3. Layer. Contents = (id) [UIImage imagenamed:@ "View_bg.png"]. Cgimage; //Add a background picture to the layer
  4. Layer. Cornerradius = 8; //Set the border of the layer to round feet
  5. Layer. maskstobounds = YES; //Hide Border
  6. Layer. borderWidth = 5; //Add a colored border to the layer
  7. Layer. bordercolor = [Uicolor colorwithred:0. The green:0. The Blue:0. Alpha:1].   Cgcolor;
  8. Layer. Shadowoffset = Cgsizemake (0, 3); //Set the offset of the shadow
  9. Layer. Shadowradius = 10. 0; //Set the radius of the shadow
  10. Layer. Shadowcolor = [Uicolor blackcolor]. Cgcolor; //Set the shadow color to black
  11. Layer. shadowopacity = 0. 9; //Set the opacity of the shadow

iOS Development note--layer layer fillets, borders, shading other common actions

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.