When using Xcode to create a project or a new class, there will be some comments generated by Xcode at the top.
For example, the above paragraph, but sometimes we want to add some content to this part of the comment, such as our own blog address, github address, company information, etc. Especially when you want to open source some tools or write some frameworks yourself. If you can’t find this folder, you can search in Contents: Cocoa Touch Class.xctemplateThere are two folders in the Templates folder Among them, File Templates is what we want to modify, and Project Templates is some descriptions we see when we create a new project, which are fixed codes automatically generated. I will talk about this part later. The above is the selection interface that pops up when we create a new class, and the following is the content in File Templates. Is it clear at a glance? Let's go to Source and take a look Snip20150812_1.pngThere are many folders in the Cocoa Touch Class.xctemplate under the Source folder (as shown below). As the name suggests, I believe everyone should know what it means. Snip20150812_5.pngI will take modifying the files in NSObjectObjective-C as an exampleThe source file is
The comments above are where we want to modify. How to modify it depends on your own preferences. ___xxx___These three underscores are equivalent to the booth symbol,
Here are the changes I made:Snip20150812_9.pngBecause _ has a special meaning in Markdown syntax, this paragraph is too painful to edit, so I just took a screenshot in the end. After the modification is completed, use Xcode to create a new class that inherits NSObject. The default generated comment template is as follows Snip20150812_7.pngI believe everyone should know what to do later~ |
<<: MIUI head Hong Feng tells you why MIUI7 is like this
>>: New features of iOS 9 SDK that developers need to know
Xiaomi, which was only founded in 2010, has now g...
This article was reviewed by Tao Ning, PhD, Assoc...
On the Chinese land There are countless great pro...
China is experiencing widespread rain and snow, a...
iPhone 6s has been on the market for more than two...
gossip "Be careful! Your body may be infiltr...
The Central Meteorological Observatory predicts T...
For developers, Apple today released the second b...
Friends who are engaged in operations may have fe...
Recently, many people have begun to speak ill of ...
Shortly after Ubuntu 23.10 was released today, ha...
Audit expert: Hu Qizhou Associate Professor, Scho...
An airplane is a very complex means of transporta...
How to promote Kuaishou live streaming ? In 4 yea...
Last Friday morning, a shocking Tesla electric car...