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」,否則插件沒法使用。
相關文章
相關標籤/搜索