IOS sets the fillet of UIView or other layer layers via storyboard

Source: Internet
Author: User

Usually we add a fillet to the button or UIView is implemented by the following code

self.button.layer.cornerradius=10;



But if you're using a story version or xib to design a view, there's actually another more powerful way to set a fillet for such a button

The principle is based on the OC language dynamic characteristics and runtime to operate ( previously used in the project, but at that time was directly take doctrine, and now encountered such problems, so now write to impress )

Below to enter the text explanation:
    • The first step: in the storyboard

    • Step two: Then in the Identity inspector, set 3 parameters to



      Isn't it very simple ah!

IOS sets the fillet of UIView or other layer layers via storyboard

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.