Objective
March 1, 2018 lunar month 14 Thu
I do not know how, early in the morning to work to write a blog;
Xcode code block
Development, do not want to write too much code, and then will use this method, to simplify the code, including the MVVM framework, it is also reflected to simplify the c inside of the garbage code, it is actually written, Xcode itself provides us, improve the writing efficiency of the shortcut-code block, is the following block:
Xcode comes with a code block
Let's take a look at the code block that comes with Xcode, and then click the left mouse button to drag it into the project
After dragging into the project
As you can see, it has helped us to write some of the key code, so we just need to fill in according to their own needs;
Xcode Custom code block
since Xcode provides such a tool, how to customize the code block according to its own needs, we commonly used, such as the property to define strong, assign, copy, week and other types, first with the strong type of example, First paste the following code into a file in the project, then select the left mouse button long press, and then drag into the code block area of Xcode;
@property (Nonatomic,strong) < #Class #> *<#Object#>;
Drag and drop the edit box, you can edit the name and description information, and then click Done;
When you take a code block with Xcode, check the drop-in project
To delete a custom code block
If you want to delete a custom code block, just select it and press the keyboard delete button "Backspace".
ios-Build Your own code block "improve coding efficiency-xcode code block"