Let's start by looking at how the code sets the rounded corners of the button:
Let's take a look at how to set a fillet for a button in storyboard or xib:
1. After adding a button in storyboard or Xib, set the title and background color, and make the constraint;
2. Click the Show the Identity Inspector button, and the button position is as follows:
3. Then add the Layer.cornerradius property to the button in the user Defined Runtime Attributes bar, type number, and set a value as required. As shown in the following:
4. The rounded corners of the buttons are basically completed here, please note! Because the runtime attribute is added to the control in the user Defined Runtime Attributes Bar, the button in the storyboard or xib is displayed in a square shape, such as:
Finally, please look at the use of code and storyboard for the button to set the fillet
iOS uses code and storyboard, xib to set rounded corners for controls (for example, as a button)