First of all, let's look at how the code rounded the button :

Let's look at how to storyboard or xib Set the fillet for the button in :

1. stay storyboard or xib After adding a button to , Set the title and background color , Do a good job of restraint ;

2. Click on Show the identity inspector Button ; The position of the button is shown in the figure below :

3. And then in User Defined Runtime Attributes Bar to add layer.cornerRadius attribute , The type is Number, Set up a Value value . As shown in the figure below :

4. So far, we have basically completed the fillet setting of the button , Please note that ! Because in User Defined Runtime Attributes Column adds runtime features to the control , So in storyboard or xib Middle button or square display , Here's the picture :

Last , Please take a look at the code and storyboard The effect of setting the fillet for the button

iOS They use code and storyboard、xib Set the fillet for the control ( Take the button as an example ) More articles about

  1. iOS for the purpose of xib Fillet the control 、 Border effect

    xib Set the fillet for various controls in Set by code @interface ViewController () @property (weak, nonatomic) IBOutlet UIView *my ...

  2. iOS stay xib or storyboard Add a fillet to the control 、 Frame and frame color

    If you want to in xib and storyboard Add rounded corners and frame width to the control , Just do it layer.borderWidth     Set the border width property layer.cornerRadius     Set fillet properties ...

  3. iOS stay xib or storyboard Add a fillet to the control 、 Frame and frame color

    If you want to in xib and storyboard Add rounded corners and frame width to the control , Just do it : layer.borderWidth Set the border width property layer.cornerRadius Set fillet properties Just for attributes ...

  4. Tool class ( Set the fillet for the control ) - iOS

    In order to facilitate the daily development efficiency , Therefore, we created some small tool classes for easy use . Specifically code as follows : Statement : /* Add a border style to the control _ Tool class */ #import <UIKit/UIKit.h> typedef ...

  5. iOS 9 Application development tutorial using switch slider control and rolling deployment view

    iOS 9 Application development tutorial using switch slider control and rolling deployment view Use ios9 Switch in . slider control Switches and sliders are also controls used to interact with users . This section will focus on these two controls . ios9 switch Switch control is often used to control the function of ...

  6. iOS Development UI piece —Date Picker and UITool Bar Control brief introduction

    iOS Development UI piece —Date Picker and UITool Bar Control brief introduction One .Date Picker Control 1. Brief introduction : Date Picker Display time control There is a default width and height , No need to set up data sources and proxies how ...

  7. XCODE Use in Main.Storyboard Pull in the control and implement the event (Swift Language )

    How to be in XCODE Medium Main.Storyboard Pull in the control and achieve a simple effect ? I have just come into contact with Swift Language soon , about IDE The operation is still very unfamiliar , I don't understand. I refer to the articles of my predecessors on the Internet . I'll show you how to ...

  8. Xib Set the fillet of the control in 、 Border effect

    There are two ways to set the fillet and border effect of the control : 1. Code implementation : self.myView.layer.masksToBounds = YES; self.myView.layer.cornerRadius = ; ...

  9. iOS Learning notes 1-- stay xcode6 Not used in the above version storyboard And some controls use

    So let's set up a iOS New project , Delete project automatically created main.storyboard as well as xib file , And in info.plist Delete these two options on the Then in the project configuration maninterface Set to null , take launch ...

Random recommendation

  1. [Android Pro] android Control ListView Split lines are also displayed at the top or bottom

    reference to  :  http://blog.csdn.net/lovexieyuan520/article/details/50846569 In the default Android Control ListView stay ...

  2. python Of optparse Module USES

    name or flags: Is the name or flag of the parameter -f --file,-q --quit etc. , among -f Express option Abbreviation ,--file Express option Full name nargs: Number of command line arguments , In general use ...

  3. Linux Next Mongodb Install and start configuration

    1. Download installation package wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz Decompress the package after downloading tar zxf mongod ...

  4. SQL Database foundation ( 6、 ... and )

    Subquery , It's also called nested query . Make a query statement as a result set for other SQL Statements use , It's like using a normal watch , A query statement that is treated as a result set is called a subquery . There are two types of subqueries : One is to return a single value subquery , It can be used in ...

  5. Write cv::Mat to a file

    If we want to OpenCV Matrix data types in cv::Mat Save in a file , You can use the following code : void writeMatToFile(cv::Mat& m, const char* filen ...

  6. C. Om Nom and Candies Cleverly optimize enumeration , Control the complexity to 10e6

    C. Om Nom and Candies Wireless Large Backpack problem #include <iostream> #include <cstdio> #include <cstrin ...

  7. SecureCRT adopt Javascrip Script implementation Ctrl+C

    The code is as follows : # $language = "JScript" # $interface = "1.0" for( i=1 ; i < 3600 ; i++) ...

  8. Use python Backup file

    Want to write a scheduled backup file function , This function needs to be implemented :1. Search the specified directory to see if the current day's file exists 2. If there is a compressed and encrypted file 3. adopt ftp Upload to backup server 4. Copy the files to the mobile hard disk regularly on the backup server and clean the files regularly Originally ...

  9. About A left join B,A It must be the main table ?

    General situation , Let's make a left connection select * from A left join B  on A.id=B.a_id; I must think A It's the main table , In fact, there are other situations , If we will sql Rewrite into  select * from ...

  10. Mybatis And typeAlias Configured 3 Methods

    1. Define an alias : <typeAliases> <typeAlias alias="User" type="cn.lxc.vo.User" /&g ...