Xcode 注释工具的使用

 

1:Xcode 8以后php

 

Goodbye World

In Xcode 8, Apple integrated a comment documentation generator plugin, which is built on top of VVDocumenter. Now this project is proud to be a part of Apple. It means you could just use the shortcut (⌥ Option + ⌘ Command + /) to add a documentation comment to your code if you are using Xcode 8 or above!html

VVDocumenter is one of my hobby projects from 2013, back to the age of Xcode 4. It serves well for these years and I am so glad that it helps a lot of developers to improve their productivity. Since there is no need to install this plugin anymore, the development of VVDocumenter will not continue. Yes, it's time to say goodbye, with a happy ending.git

Thank you all for your selfless support to this project. Let's build more great things and make the world better in future!github

 

即,Xcode 8以后,无需使用注释插件VVDocumenter了,Xcode已经将其融合进去了xcode

 

使用方法:option+command+/app

 

 

 

2:Xcode 8以前less

 

下载地址:https://github.com/onevcat/VVDocumenter-Xcode#goodbye-worldui

 

效果图this

Objective-C效果图:
 
 
Swift 效果图
 

 

安装步骤以下:
 
1、查看Xcode的UUID
 
方式1
终端执行 defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
 

 

拷贝选中的字符串。
 
方式2
在应用程序目录中找到Xcode.app,右键”显示包内容”,进入Contents文件夹,双击Info.plist打开,找到DVTPlugInCompatibilityUUID,拷贝后面的字符串。
 
2、添加Xcode的UUID到VVDocumenter-Xcode的Info.plist文件
 
方式1--插件已经安装完成
一、打开 xcode插件所在的目录:~/Library/Application Support/Developer/Shared/Xcode/Plug-ins;
二、选择已经安装的插件例如VVDocumenter-Xcode,右键”显示包内容”;
三、找到info.plist 文件,找到DVTPlugInCompatibilityUUIDs的项目,添加一个Item,Value的值为以前Xcode的UUID,保存。

 

 
方式2--插件还未安装/从新安装
一、从GitHub克隆 仓库到本地,在Xcode中打开项目,选择 项目名称,在TAGETS下选中VVDocumenter-Xcode;

 

二、选择Info,找到DVTPlugInCompatibilityUUIDs的项目,添加一个Item,Value的值为以前Xcode的UUID;

 

三、Build项目,VVDocumenter-Xcode会自动安装。
 
3、重启Xcode
Xcode 6以后,重启Xcode时会提示“Load bundle”、 “Skip Bundle”,这里必须选择“Load bundle”,否则插件没法使用。
相关文章
相关标签/搜索