IOS development tips-custom XCode code snippets
There is a saying that smart programmers Know How To Be "lazy" to improve development efficiency. in our daily development, some code snippets are often used. You may think that defining some macros can solve the problem, but you may encounter protocol methods such as UITableView, or do you want to quickly define a UIButton when writing a Demo (except storyboard, of course?
Okay. What is a code snippet first?
Enter if in XCode, select ifelse, and press Enter.
This is the code snippet that the system has defined for us. It can quickly complete the code snippets we want and greatly improve the programming efficiency of programmers. What we need to do is to achieve this effect.
The procedure is actually very simple. Use the UITableView protocol method as an example.
Remember! <# The parameter name prompt you want to give #> is the key.
Finally, the code snippets in Xcode are stored in ~ by default ~ /Library/Developer/Xcode/UserData/CodeSnippets can be directly copied to others for sharing resources.
In addition, we can also define many other commonly used code snippets, which is much better than defining them as macros. For example, the singleton... attribute... let's try it by yourself.
@ Reprinted please note, iOS @ confused little bookboy, thank you!