Extract annotations from the source code special tools for generating documents:
[Doxygen] (http://www.stack.nl/~dimitri/doxygen/index.html): Suitable for generating HTML documents and PDF documents. Supported by many languages, can be configured in more places. The default generated style is inconsistent with Apple's style. [Headdoc] (http://developer.apple.com/opensource/tools/headerdoc.html): Is the document generation tool that comes with Xcode. After you install Xcode, you can use the command line to generate the corresponding document. But it only generates the/*! */The format of the comment. Not compatible/** */format comments [Appledoc] (http://gentlebytes.com/appledoc/): [GitHub address] (Https://github.com/tomaz/appledoc), which is suitable for generating HTML documents and Xcode help documents (Docset). can be compatible with/** * /Format, can also be compatible/*! */The format of the comment.
I have directly selected the Appledoc, the following is the installation steps and use steps:
installationTwo different ways:
1 if you installed the homebrew, open the terminal and enter the following command:
brew install appledoc
The first use of this way, the installation, although successful but to find the generated HTML file, and then found the file opened after the content is not right, so if you have a friend to see after you can tell me how the matter, first thank you ~
2 Open the terminal and enter the following command:
git clone git://github.com/tomaz/appledoc.gitcd appledocsudo sh install-appledoc.sh
I here is the choice of the second way, do not know the speed is slow or what, waiting for too long to end the first way, the beginning of the second way.
3. After the terminal command finishes executing, the following actions are performed, as shown, to indicate success.
Use
First create a project Appledoc, for illustrative purposes, write a few comments:
////VIEWCONTROLLER.M//Appledoc////Created by think Peng on 2017/4/5.//Copyright 2017 think Peng. All rights reserved.//#import"ViewController.h"//Master Controller@interface Viewcontroller () @property (nonatomic, strong) NSString*name;/**< name*/@property (nonatomic, strong) NSString*sex;/**< Sex*/@property (nonatomic, assign) Nsinteger age;/**< Age*/@property (nonatomic, strong) NSString*address;/**< Address*/@end @implementation Viewcontroller- (void) viewdidload {[Super viewdidload];}/** Network Request Method @param params required Parameters*/- (void) NetWork: (Nsdictionary *)params { }/** Return string method @param string passed string @return*/-(NSString *)string: (NSString *)string { return string;} @end
Terminal Input Command:
using commands to create // format: Appledoc--project-name your project name--project-company your company name. Appledoc--project-name appledoc--project-company Combanc.
As shown in: (in the format of the Chinese place to try the specified yo), it means the successful creation of the annotated document.
The following files are generated under the project file:
Open the file, where the path is the path of the generated document, usually HTML format, along the path to find down
Here are the three document packages I generated:
Right-click to display the contents of the package, this HTML file is what you need to open the following:
Finally open the HTML file, the effect appears as follows:
The Gaocheng. Hehe, forgive me yesterday in order to catch the bus, this morning to fill the blog record ...
Generate Ios-xcode Technical Documentation